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-March/133618.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 3Ethan Furman ethan at stoneleaf.us
Thu Mar 27 20:11:03 CET 2014
On 03/27/2014 11:59 AM, Guido van Rossum wrote:
>
> PS. I am not trying to be difficult. I honestly don't understand the use case yet, and the PEP doesn't do much to
> support it.

How's this?
----------------------------------------------------------------------------
Compatibility with Python 2
===========================

As noted above, ``%s`` is being included solely to help ease migration from,
and/or have a single code base with, Python 2.  This is important as there
are modules both in the wild and behind closed doors that currently use the
Python 2 ``str`` type as a ``bytes`` container, and hence are using ``%s``
as a bytes interpolator.

However, ``%b`` should be used in new, Python 3 only code, so ``%s`` will
immediately be deprecated, but not removed until the next major Python
release.
----------------------------------------------------------------------------

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