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/2014-March/133531.html below:

[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3Thomas Wouters thomas at python.org
Wed Mar 26 16:14:00 CET 2014
On Tue, Mar 25, 2014 at 11:37 PM, Ethan Furman <ethan at stoneleaf.us> wrote:

> In particular, ``%s`` will not accept numbers (use a numeric format code
> for
> that), nor ``str`` (encode it to ``bytes``).
>

I don't understand this restriction, and there isn't a rationale for it in
the PEP (other than "you can already use numeric formats", which doesn't
explain why it's undesirable to have it anyway.) It is extremely common in
existing 2.x code to use %s for anything, just like people use {} for
anything with str.format. Not supporting this feels like it would be
problematic for porting code. Did this come up in the earlier discussions?

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm an email virus! Think twice before sending your email to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140326/66fdcc08/attachment.html>
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