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/2014-January/131164.html below:

[Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

[Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5 [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5Eric V. Smith eric at trueblade.com
Fri Jan 10 23:33:57 CET 2014
On 1/10/2014 5:29 PM, Antoine Pitrou wrote:
> On Fri, 10 Jan 2014 12:56:19 -0500
> "Eric V. Smith" <eric at trueblade.com> wrote:
>>
>> I agree. I don't see any reason to exclude int and float. See Guido's
>> messages http://bugs.python.org/issue3982#msg180423 and
>> http://bugs.python.org/issue3982#msg180430 for some justification and
>> discussion.
> 
> If you are representing int and float, you're really formatting a text
> message, not bytes. Basically if you allow the formatting of int and
> float instances, there's no reason not to allow the formatting of
> arbitrary objects through __str__. It doesn't make sense to
> special-case those two types and nothing else.

It might not for .format(), but I'm not convinced. But for %-formatting,
str is already special-cased for these types.

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