This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, eric.smith, ssc, terry.reedy
Date 2010-10-08.23:55:21
SpamBayes Score 1.0162607e-07
Marked as misclassified No
Message-id <1286582123.46.0.60230979674.issue10043@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-10-08 23:55:23terry.reedysetrecipients: + terry.reedy, eric.smith, docs@python, ssc
2010-10-08 23:55:23terry.reedysetmessageid: <1286582123.46.0.60230979674.issue10043@psf.upfronthosting.co.za>
2010-10-08 23:55:21terry.reedylinkissue10043 messages
2010-10-08 23:55:21terry.reedycreate