I thought there was a discussion of this earlier, and the idea was to leave the prior implementation, because that's how it's implemented in 3.0. bin() is a new feature in 2.6, so there's no particular need to make it work like hex() and oct(). Recall that in 3.0, __bin__, __oct__, and __hex__ don't exist. Instead, you use __index__ for integer conversions. That's how bin() worked in 2.6 until this checkin. But now that I look for it, I can't find the original discussion. raymond.hettinger wrote: > Author: raymond.hettinger > Date: Fri Jun 20 06:18:15 2008 > New Revision: 64424 > > Log: > Make bin() implementation parallel oct() and hex() so that int/long subclasses can override or so that other classes can support.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4