Roundup Robot added the comment:
New changeset 199d9e3fe0ce by Benjamin Peterson in branch '3.2':
document __bytes__ special method (closes #13259)
http://hg.python.org/cpython/rev/199d9e3fe0ce
New changeset 4128de054937 by Benjamin Peterson in branch 'default':
merge 3.2 (#13259)
http://hg.pyt
Antoine Pitrou added the comment:
Indeed. I didn't even remember we had that. There are tests, however, in
Lib/test/test_bytes.py.
This was added in issue #2415, by the way.
--
nosy: +pitrou
stage: -> needs patch
versions: -Python 3.1, Python 3.4
New submission from Arkadiusz Wahlig :
It looks like Python 3 supports the __bytes__ magic method (called by
bytes(obj)). However, it's not documented anywhere.
Also, I could not find any reference to BDFL accepting it but it looks like it
got in anyway.
Here are some posts back from 2007 whe