Hi,

I am looking for an elegant way to solve the following problem:

Within a function

def Foo(**parms)

I have a list of names, say  VList=['A','B','C1']
and I like to generate abbreviation
_A identical to parms['A']

for that I could write

def Foo(**parms) :
  for N in VList :
    if  N in parms :
      vars()[N]= parms[N]
    else :
      vars()[N]= None

Does this work, is it typical Python?

Many thanks for a hint,
Helmut.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to