locals() and dictionaries

JerryB grblanco at gmail.com
Wed Feb 1 17:44:03 EST 2006


Rocco:
thanks for your response. The examples were just made up. I don't
normally use 'dict' and 'str'.
I know I can create a dictionary with the variables I want, etc. My
question is not how to solve the problem, or how to come up with a
work-around (I'm getting pretty good at this one :), so my question
stands:

is it possible to access the individual members of a dictionary using %
locals() when creating a string?

Thank you again for your suggestions.
Jerry




More information about the Python-list mailing list