[Python-ideas] a new bytestring type?
Ethan Furman
ethan at stoneleaf.us
Sun Jan 5 21:04:20 CET 2014
On 01/05/2014 11:33 AM, Ethan Furman wrote:
> As anyone who has worked with Python 3 and low-level protocols knows, Python 3 has no 'bytestring' type. It has
> immutable and mutable versions of arrays of integers, otherwise known as 'bytes' and 'bytearray'.
>
> How many would be interested in having a 'bytestring'?
+1
> What do you see as the distinguishing characteristics?
Indexing returns a bytestring of length 1, not an integer
`bytestring(7)` either fails, or returns 'bytestring('\x07')' not 'bytestring(0, 0, 0, 0, 0, 0, 0)'
--
~Ethan~
More information about the Python-ideas
mailing list