parameters: (arguments, key, edict)
docstring: Substitute a single enum keyword argument, if it occurs
docstring_summary: Substitute a single enum keyword argument, if it occurs
docstring_tokens: Substitute a single enum keyword argument if it occurs
function: def enumsubst(arguments, key, edict):
      """Substitute a single enum keyword argument, if it occurs"""
      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
function_tokens: 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