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

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

[Python-Dev] transitioning from % to {} formatting [Python-Dev] transitioning from % to {} formattingEric Smith eric at trueblade.com
Thu Oct 8 17:27:14 CEST 2009
Benjamin Peterson wrote:
> 2009/10/8 Eric Smith <eric at trueblade.com>:
>> Christian Tanzer wrote:
>>> IMHO, either the translation is done once and gives identical output or
>>> it isn't worth doing at all.
>> I disagree. I doubt even 0.001% of all format strings involve octal
>> formatting. Is it really worth not providing a transition path if it can't
>> cover this case?
> 
> It's also really easy to just write 0{:o} like my translator does.
> 
> 

I apologize for not having looked at anyone's implementation yet. But I 
suspect you'll have a problem with this case unless int.__format__ has 
special logic for backward compatible octal formatting:

 >>> '%# 5o' % 8
'  010'

Eric.

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