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

2014年2月24日 14:42:07 -0800

On 2014年2月25日 08:33:53 +1000
Nick Coghlan <[email protected]> wrote:
> As far as use cases go, as someone else mentioned, the main one is likely
> to be binary logging and error reporting formats, as it becomes a quick and
> easy way to embed a backslash escaped string.
That's a fringe use case, though. Also, your binary logging format
probably has a well-defined character set that's not necessarily ASCII
(perhaps UTF-8), so using the proposed "%a" is sub-optimal and
potentially confusing (if lots of non-ASCII characters get escaped as
\uxxxx).
> However, my interest is more
> in providing an obvious way to do it and in minimising the differences
> between text and binary interpolation.
That sounds very theoretical.
Regards
Antoine.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to