[Python-Dev] Mini-Pep: Simplifying the Integral ABC

Guido van Rossum guido at python.org
Sat Jun 7 00:23:12 CEST 2008

Both of these seem 2.6-specific quirks. Those lines wereJeffrey's;
maybe he remembers? I'm guessing that adding __long__ was done since
2.6 supports it, and the removal of __int__ was an oversight.  I also
think that there's no reason to change __index__ to call long(); int()
will automatically return a long as needed. Maybe changing __long__
back to __int__ is also harmless.

On Fri, Jun 6, 2008 at 2:13 PM, Raymond Hettinger <python at rcn.com> wrote:
> From: "Guido van Rossum" <guido at python.org>
>> Make that int() instead of long() and I'm okay with it.
> Does anyone know why Integral says that __long__ is a required abstract
> method, but not __int__?
> Likewise, why is index() defined as long(self) instead of int(self)?
> There may be some design nuance that I'm not seeing.
> Raymond
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/guido%40python.org

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list