def enumsubst(arguments, key, edict):
 if ((key not in arguments) or (edict is None)):
  return
 v = arguments[key]
 ok = edict.values()
 if (v in edict):
  arguments[key] = Enum(edict[v])
 elif (not (v in ok)):
  raise TypeError, ('Unknown enumerator: %s' % v)

def enumsubst ( arguments , key , edict ) : if ( ( key not in arguments ) or ( edict is None ) ) : return v = arguments [ key ] ok = edict . values ( ) if ( v in edict ) : arguments [ key ] = Enum ( edict [ v ] ) elif ( not ( v in ok ) ) : raise TypeError , ( 'Unknown enumerator: %s' % v )
substitute a single enum keyword argument .