names of parameters as string

Peter Otten __peter__ at web.de
Sat Oct 30 22:02:56 CEST 2004


Steve Holden wrote:

> [No] guarantees to work on any specific implementation.

What do you mean - the locals() analogue to 

globals()[name] = value  

or my exec workaround?

def somefunc():
    value = as_you_like_it
    exec "%s = value" % name

inquisitively, far from Spain
Peter




More information about the Python-list mailing list