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/092598.html below:

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

[Python-Dev] transitioning from % to {} formatting [Python-Dev] transitioning from % to {} formattingGuido van Rossum guido at python.org
Mon Oct 5 17:28:27 CEST 2009
\>> I hate calling methods on string literals, I think it looks very odd
>> to have code like this:
>>
>>   "Displaying {0} of {1} revisions".format(x, y)
>
> Ugh!  Good point.

This objection was made years ago when we introduced
"separator".join(list_of_things), and I don't think ignoring it has
caused any casualties. In fact, it serves as an early reminder to the
user that string literals are, in fact, objects like all others.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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