[Python-Dev] str.format_from_mapping (original) (raw)
Eric Smith eric at trueblade.com
Sun Oct 31 21:39:44 CET 2010
- Previous message: [Python-Dev] test_grp regression test fails with NIS entries present
- Next message: [Python-Dev] str.format_from_mapping
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What are your thoughts on adding a str.format_from_mapping (or similar name, maybe the suggested "format_map") to 3.2? See http://bugs.python.org/issue6081 . This method would be similar to "%(foo)s %(bar)s" % d, where d is a dict (or rather any mapping object), but of course would use str.format syntax: "{foo} {bar}".format_from_mapping(d).
I like the idea. It's particularly handy when converting from %-formatting.
Eric.
- Previous message: [Python-Dev] test_grp regression test fails with NIS entries present
- Next message: [Python-Dev] str.format_from_mapping
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]