Terry J. Reedy <tjre...@udel.edu> added the comment:

The usual way to set a module variable by name, rather than
setattr(modules[__name__], 'name', 'value')
is
>>> globals()['name'] = 2
>>> name
2

Issues of working with external names, such as from database columns, has been 
discussed several times on python-list and the corresponding newsgroups. Please 
post there is you want to discuss that.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10043>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to