[Python-Dev] str.format_from_mapping

Nick Coghlan ncoghlan at gmail.com
Mon Nov 1 12:25:22 CET 2010


On Mon, Nov 1, 2010 at 10:53 AM, Barry Warsaw <barry at python.org> wrote:
> On Oct 31, 2010, at 04:39 PM, Eric Smith wrote:
>
>>What are your thoughts on adding a str.format_from_mapping (or similar
>>name, maybe the suggested "format_map") to 3.2?
>
> +1 for the shorter name.

+1 for a format_map() method that takes a single mapping argument
(Eric's patch on the issue). -1 for the most recent patch attached to
that issue that allows further positional arguments after the mapping
object.

(Raymond mentioned it on the issue, but I'll mention it here as well:
this addition would fall under the "case-by-case exemption" clause in
the moratorium PEP, since it adds a new method to a builtin type)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list