[issue2415] bytes() should respect __bytes__

Benjamin Peterson report at bugs.python.org
Thu Aug 21 19:18:53 CEST 2008


Benjamin Peterson <musiccomposition at gmail.com> added the comment:

Here's a patch. It's only implemented for bytes. Doing this for
bytearray would require a bit of refactoring, and can I think wait for
3.1. I added two new C functions. PyObject_Bytes and PyBytes_FromObject.
You can review it at http://codereview.appspot.com/3245.

----------
keywords: +patch
Added file: http://bugs.python.org/file11194/2415.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2415>
_______________________________________


More information about the Python-bugs-list mailing list