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

2014年2月24日 11:39:57 -0800

On 2/24/2014 10:40 AM, Ethan Furman wrote:
Somebody might, and it's better than having them inappropriately add a __bytes__ method if we don't have it.
I'll admit my first thought on reading the initial discussions about adding bytes % formatting was "Oh, if I want to display custom objects in a byte stream, just add a __bytes__ method." I don't believe there is any verbiage in the PEP (that might get transferred to the documentation) that explains why that would be a bad idea. Should there be? Whether or not %a is implemented sooner or later?
_______________________________________________
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