[Python-Dev] [Python-checkins] peps: PEP 460: add .format_map() (original) (raw)

Eric V. Smith eric at trueblade.com
Fri Jan 10 16:36:05 CET 2014


On 1/10/2014 10:20 AM, Nick Coghlan wrote:

On 10 January 2014 07:41, Eric V. Smith <eric at trueblade.com> wrote:

I'm not sure how formatmap helps in porting from 2 to 3, since it doesn't exist in any version of 2.

Although that said, it's no doubt a useful feature, just not useful in code that supports both 2 and 3 with a single code base or when porting to 3. It's purely a matter of consistency with str - if we're adding binary interpolation back to Python 3 (which I have been persuaded is a good idea), then we should provide the same three typical spellings of the operation that str provides. Cheers, Nick.

I'm perfectly okay with that, and it was on my list of things to suggest. I just think that the PEP should be focused on porting code from 2 to 3 and on code that runs on both 2 and 3. I think the Rationale should state this clearly.

Eric.



More information about the Python-Dev mailing list