def create_item_version(item):
 if (not item.version_fields):
  return
 _hash = hashlib.sha1()
 for attrname in item.version_fields:
  _hash.update(repr(item.get(attrname)))
 return _hash.digest()

def create_item_version ( item ) : if ( not item . version_fields ) : return _hash = hashlib . sha1 ( ) for attrname in item . version_fields : _hash . update ( repr ( item . get ( attrname ) ) ) return _hash . digest ( )
item version based on hashlib .