Question about locals()
Gökhan SEVER
gokhansever at gmail.com
Tue May 19 00:35:04 EDT 2009
Hello,
Could you please explain why locals() allow me to create variables that are
not legal in Python syntax. Example: locals()['1abc'] = 55. Calling of 1abc
results with a syntax error. Shouldn't it be better to raise an error during
the variable creation time?
Thank you
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090518/73a9daf0/attachment.html>
More information about the Python-list
mailing list