A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-October/092813.html below:

[Python-Dev] transitioning from % to {} formatting

[Python-Dev] transitioning from % to {} formatting [Python-Dev] transitioning from % to {} formattingRaymond Hettinger python at rcn.com
Thu Oct 8 19:14:19 CEST 2009
[Christian Tanzer]
>> How do you suppose that maintainers could ever do the transition from
>> %- to {}-formatting manually?

[Guido van Rossum]
> This is pretty much the situation with integer division (you can only
> recognize it by running the code),

Do you think there may be some possible parallel to the -3 option
to flag cases of %-formatting?  If so, that could be helpful.



> So, yes, we will continue to make noise about this. And yes you should
> opportunistically migrate your code to {}-formatting, like when you're
> rewriting some code anyway. One of the nice things about {}-formatting
> is that in most cases (things like the logging API excluded) you can
> change it one format string at a time.

I've already have some code that mixes the styles (using {} for new stuff).


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4