replace %(word) in a string
Skip Montanaro
skip at pobox.com
Wed Sep 17 13:43:38 EDT 2003
Fred> Yes, that's a wonderful feature. Recently though, I've wondered a
Fred> couple of times : is there an easy way to substitute with both
Fred> local AND global variables ?...
Sure, search the list archives for something like EvalDict. Basically, you
want a class which behaves like a dict, but will search through multiple
dictionaries looking for matching keys.
Skip
More information about the Python-list
mailing list