A RetroSearch Logo

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

Search Query:

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

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

[Python-Dev] transitioning from % to {} formatting [Python-Dev] transitioning from % to {} formattingVinay Sajip vinay_sajip at yahoo.co.uk
Fri Oct 2 00:12:03 CEST 2009
James Y Knight <foom <at> fuhm.net> writes:

> Using containment instead of inheritance makes sure none of the  
> *other* operations people do on strings will appear to work, at least  
> (substring, contains, etc). I bet explicitly calling str() on a format  
> string is even more rare than attempting to do those things.

Actually, logging calls str() on the object passed as the first argument in a
logging call such as logger.debug(), which can either be a format string or an
arbitrary object whose __str__() returns the format string.

Regards,

Vinay Sajip

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