def StrKey(key_str):
 parts = key_str.split(u'\x00\x00')
 for i in xrange(len(parts)):
  if (parts[i][0] == ':'):
   part = parts[i][1:]
   part = zero_one_matcher.sub(u'\x00', part)
   parts[i] = part
  else:
   parts[i] = int(parts[i])
 return datastore.Key.from_path(*parts)

def StrKey ( key_str ) : parts = key_str . split ( u'\x00\x00' ) for i in xrange ( len ( parts ) ) : if ( parts [ i ] [ 0 ] == ':' ) : part = parts [ i ] [ 1 : ] part = zero_one_matcher . sub ( u'\x00' , part ) parts [ i ] = part else : parts [ i ] = int ( parts [ i ] ) return datastore . Key . from_path ( * parts )
the inverse of the keystr function .