On 09/01/2016 04:07 PM, Victor Stinner wrote:
2016-09-02 0:04 GMT+02:00 Ethan Furman:

- `fromord` to replace the mistaken purpose of the default constructor

To replace a bogus bytes(obj)? If someone writes bytes(obj) but expect
to create a byte string from an integer, why not using bchr() to fix
the code?

The problem with only having `bchr` is that it doesn't help with `bytearray`; 
the problem with not having `bchr` is who wants to write `bytes.fromord`?

So we need `bchr`, and we need `bytearray.fromord`; and since the major 
difference between `bytes` and `bytearray` is that one is mutable and one is 
not, `bytes` should also have `fromord`.

--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
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