This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.smith
Recipients abacabadabacaba, alex, barry, docs@python, eric.smith, serhiy.storchaka
Date 2016-05-06.15:41:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462549276.26.0.577648619085.issue18531@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2016-05-06 15:41:16eric.smithsetrecipients: + eric.smith, barry, alex, abacabadabacaba, docs@python, serhiy.storchaka
2016-05-06 15:41:16eric.smithsetmessageid: <1462549276.26.0.577648619085.issue18531@psf.upfronthosting.co.za>
2016-05-06 15:41:16eric.smithlinkissue18531 messages
2016-05-06 15:41:15eric.smithcreate