def new_feed_id(entry, cache={}):
 try:
  s = (entry['title'] + entry['link'])
 except KeyError:
  msg = 'Required key missing: %r'
  raise BogusEntry((msg % entry))
 hashval = hash(s)
 sign = ('A' if (0 < hashval) else 'B')
 _id = ((entry['state'].upper() + 'F') + (str(hashval) + sign).zfill(21))
 return _id

def new_feed_id ( entry , cache = { } ) : try : s = ( entry [ 'title' ] + entry [ 'link' ] ) except KeyError : msg = 'Required key missing: %r' raise BogusEntry ( ( msg % entry ) ) hashval = hash ( s ) sign = ( 'A' if ( 0 < hashval ) else 'B' ) _id = ( ( entry [ 'state' ] . upper ( ) + 'F' ) + ( str ( hashval ) + sign ) . zfill ( 21 ) ) return _id
generate an entry id using the hash value of the title and link .