String formatting with two dictionaries?
Xavier Defrang
xavier at perceval.net
Tue Oct 9 07:13:47 EDT 2001
On Tue, 9 Oct 2001, Carsten Gaebler wrote:
> "%(foo) %(bar)" % magic(dict1, dict2, ...)
So what about writing a class called "magic" that takes a bunch of dictionaries as __init__ arguments, and use an overridden __getitem__ to perform look-ups thegiven dictionaries?
Xavier Defrang
Perceval R&D Team
xavier at perceval.net
-------------------------------------------------
Perceval Technologies SA/NV Tel: +32-2-6409194
Rue Tenbosch, 9 Fax: +32-2-6403154
B-1000 Brussels http://www.perceval.net
BELGIUM info at perceval.net
-------------------------------------------------
More information about the Python-list
mailing list