[EMAIL PROTECTED] wrote:
    Tino> Yeah, its a bit hard to spot:

    Tino> 
http://docs.python.org/library/stdtypes.html#string-formatting-operations

That shows how to use the template formatting as it currently exists.  To my
knowledge there is no support for the inverse operation, which is what Joe
asked about.  Given a string and a format string assign the elements of the
string which correspond to the template elements to key/value pairs in a
dictionary.

??? can you elaborate? I don't see the problem.

"%(foo)s" % mapping

just calls get("foo") on mapping so if you have a dictionary
with all possible values it just works. If you want to do
some fancy stuff just subclass and change the method
call appropriately.

Regards
Tino

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to