New submission from Dan L <choralr...@naver.com>:

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
>>>"

----------
assignee: d...@python
components: Documentation
messages: 112857
nosy: d...@python, jdan
priority: normal
severity: normal
status: open
title: vars() dictionary access to generate variables
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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

Reply via email to