def nameVariations(name, fromPtdf=0):
 name1 = name2 = name3 = u''
 if (fromPtdf or re_nameIndex.search(name)):
  namedict = analyze_name(name, canonical=1)
  name1 = namedict['name']
  if fromPtdf:
   if namedict.has_key('imdbIndex'):
    name3 = name
  else:
   name3 = build_name(namedict, canonical=1)
 else:
  name1 = canonicalName(name)
  name3 = u''
 name2 = normalizeName(name1)
 if (name1 == name2):
  name2 = u''
 _aux_logger.debug('name variations: 1:[%s] 2:[%s] 3:[%s]', name1, name2, name3)
 return (name1, name2, name3)

def nameVariations ( name , fromPtdf = 0 ) : name1 = name2 = name3 = u'' if ( fromPtdf or re_nameIndex . search ( name ) ) : namedict = analyze_name ( name , canonical = 1 ) name1 = namedict [ 'name' ] if fromPtdf : if namedict . has_key ( 'imdbIndex' ) : name3 = name else : name3 = build_name ( namedict , canonical = 1 ) else : name1 = canonicalName ( name ) name3 = u'' name2 = normalizeName ( name1 ) if ( name1 == name2 ) : name2 = u'' _aux_logger . debug ( 'name variations: 1:[%s] 2:[%s] 3:[%s]' , name1 , name2 , name3 ) return ( name1 , name2 , name3 )
build name variations useful for searches; if fromptdf is true .