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/133582.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 3 [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3Antoine Pitrou solipsis at pitrou.net
Thu Mar 27 12:24:49 CET 2014
On Tue, 25 Mar 2014 15:37:11 -0700
Ethan Furman <ethan at stoneleaf.us> wrote:
> 
> ``%a`` will call ``ascii()`` on the interpolated value.  This is intended
> as a debugging aid, rather than something that should be used in production.
> Non-ASCII values will be encoded to either ``\xnn`` or ``\unnnn``
> representation.  Use cases include developing a new protocol and writing
> landmarks into the stream; debugging data going into an existing protocol
> to see if the problem is the protocol itself or bad data; a fall-back for a
> serialization format; or even a rudimentary serialization format when
> defining ``__bytes__`` would not be appropriate [8].

The "use cases" you are enumerating for "%a" are chimeric. Did you
*actually* do those things in real life, or are you inventing them for
the PEP?

Regards

Antoine.


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