Message112857
Perhaps it's assumed that you should know about this by knowing about how the vars dictionary is implemented, but to someone unfamiliar like me it seems like the builtin functions documentation for vars() should mention that you can create a variable name from a string using vars()['string_containing_variable_name'] = value, i.e.
>>> vars()['hi']=3
>>> hi
3
>>>
Just to include text for a possible fix (to be appended to the existing description):
"You can create a variable name from a string using vars()['string_containing_variable_name'] = value, i.e.
>>> vars()['hi']=3
>>> hi
3
>>>" |
|
Date |
User |
Action |
Args |
2010-08-04 18:39:47 | jdan | set | recipients:
+ jdan, docs@python |
2010-08-04 18:39:47 | jdan | set | messageid: <1280947187.21.0.503447106682.issue9515@psf.upfronthosting.co.za> |
2010-08-04 18:39:45 | jdan | link | issue9515 messages |
2010-08-04 18:39:45 | jdan | create | |
|