This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年10月24日 22:49 by yak, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg146334 - (view) | Author: Arkadiusz Wahlig (yak) | Date: 2011年10月24日 22:49 | |
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 where he argues against it: http://mail.python.org/pipermail/python-3000/2007-August/009375.html |
|||
| msg146336 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年10月24日 22:58 | |
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. |
|||
| msg146342 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年10月25日 04:07 | |
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.python.org/cpython/rev/4128de054937 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:23 | admin | set | github: 57468 |
| 2011年10月25日 04:07:22 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg146342 resolution: fixed stage: needs patch -> resolved |
| 2011年10月24日 22:58:09 | pitrou | set | versions:
- Python 3.1, Python 3.4 nosy: + pitrou messages: + msg146336 stage: needs patch |
| 2011年10月24日 22:49:05 | yak | create | |