Eric V. Smith added the comment:

I think it's okay to change this as far as str.format() goes.

Interestingly enough, the motivating case to add str.format_map() in issue 6081 
was exactly this kind of code. Although I notice that the example in that 
issue, which it shows as failing, works in both 2.7 and 3.4 (the only versions 
I have handy). So I'm not sure what changed after 2009 to cause that code to 
start working, but I'd be okay with it breaking again. But maybe we should 
track it down, in case it was deliberately changed and is important to someone.

In any event, since str.format_map() is well-known (to me, at least!), and is 
the approved way of getting the behavior of passing a specific map in to the 
format machinery, I'm okay with changing **dict to create an exact new dict, at 
least as far as str.format() goes. I can't speak to the overall implications 
(such as other APIs and performance).

I agree it would be a 3.6 only change (and I've change the versions to reflect 
that).

----------
versions:  -Python 2.7, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to