[Python-ideas] Fixing the Python 3 bytes constructor
Alexander Heger
python at 2sn.net
Sat Mar 29 19:31:33 CET 2014
>>>> bytearray.fill(5, 97)
why would you not want to write this as
bytearray(5).fill(97) ?
>>3. Deprecate the current "bytes(x)" and "bytearray(x)" int handling as
>>not only ambiguous, but actually a genuine bug magnet (it's way too
>>easy to accidentally pass a large integer and try to allocate a
>>ridiculously large bytes object)
I think these are just fine.
More information about the Python-ideas
mailing list