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

[Python-Dev] PEP 460 reboot

[Python-Dev] PEP 460 reboot [Python-Dev] PEP 460 rebootDaniel Holth dholth at gmail.com
Mon Jan 13 03:07:27 CET 2014
On Sun, Jan 12, 2014 at 8:27 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 01/12/2014 04:47 PM, Guido van Rossum wrote:
>>
>>
>> %s seems the trickiest: I think with a bytes argument it should just
>> insert those bytes (and the padding modifiers should work too), and
>> for other types it should probably work like %a, so that it works as
>> expected for numeric values, and with a string argument it will return
>> the ascii()-variant of its repr(). Examples:
>>
>> b'%s' % 42 == b'42'
>> b'%s' % 'x' == b"'x'" (i.e. the three-byte string containing an 'x'
>> enclosed in single quotes)
>
>
> I'm not sure about the quotes.  Would anyone ever actually want those in the
> byte stream?
>
> --
> ~Ethan~

Is there a formatting character that means "anything except a unicode
string" to prevent accidentally interpolating a Unicode string into a
bytes string without [a sane] encoding?
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