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

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes [Python-Dev] PEP 461 - Adding % and {} formatting to bytesEthan Furman ethan at stoneleaf.us
Wed Jan 15 22:24:15 CET 2014
On 01/15/2014 06:45 AM, Brett Cannon wrote:
>
> I also think that a 'b' conversion be added to bytes.format(). This doesn't have the same issue as %b if you make {}
> implicitly mean {!b} in Python 3.5 as {} will mean what is the most accurate for bytes.format() in either version. It
> also allows for explicit support where you know you only want a byte and allows {!s} to mean you only want a string (and
> thus throw an error otherwise).

Given that !b does not exist in Py2, !s (like %s) has to mean bytes when working with a byte stream.  Given that, !s and 
!b would mean the same thing, so it worth adding !b?

--
~Ethan~
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