Antoine Pitrou added the comment:

> Note that there is alternative API function PyObject_Bytes(), that accepts 
> same arguments as the bytes() constructor, except an integer, and supports 
> the buffer protocol, the iterable protocol, and in additional supports the 
> __bytes__() special method.

That's a good point. Then I think PyBytes_FromObject() should be restricted. 
Also the docs for these functions should probably mention each other.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26759>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to