[Python-Dev] PEP 467: Minor API improvements for bytes & bytearray (original) (raw)

Barry Warsaw barry at python.org
Mon Aug 18 15:50:00 CEST 2014


On Aug 17, 2014, at 09:39 PM, Antoine Pitrou wrote:

need for a special case for a single byte. We already have a perfectly good spelling: NUL = bytes([0]) That is actually a very cumbersome spelling. Why should I first create a one-element list in order to create a one-byte bytes object?

I feel the same way every time I have to write set(['foo']).

-Barry



More information about the Python-Dev mailing list