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.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to