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

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

[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2 [Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2Ethan Furman ethan at stoneleaf.us
Sun Feb 23 21:42:59 CET 2014
On 02/23/2014 03:33 AM, Antoine Pitrou wrote:
> On Sat, 22 Feb 2014 17:56:50 -0800
> Ethan Furman <ethan at stoneleaf.us> wrote:
>>
>> ``%a`` will call :func:``ascii()`` on the interpolated value's :func:``repr()``.
>> 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.
>
> Why is "%a" here? I don't remember: was this discussed before?
> "Intended as a debugging aid" sounds like a weak justification to me.

https://mail.python.org/pipermail/python-dev/2014-January/131808.html

The idea being if we offer %a, folks won't be tempted to abuse __bytes__.

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