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/2008-June/080062.html below:

[Python-Dev] converting the stdlib to str.format

[Python-Dev] converting the stdlib to str.format [Python-Dev] converting the stdlib to str.formatAntoine Pitrou solipsis at pitrou.net
Thu Jun 5 16:49:35 CEST 2008
Nick Coghlan <ncoghlan <at> gmail.com> writes:
> 
> %r is about the worst case for the new syntax relative to the old - two 
> characters become 5.

Well there are other very common "worst cases" - namely %d, %f (and probably
a few less commonly used ones such as %X).

> For dictionary formatting, str.format() is a clear winner over 
> str.__mod__().

Agreed. %(something)s is quirky - you are bound to forget the final "s"
(or whatever other specifier) from time to time.

Antoine.



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