A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-August/068228.html below:

[Python-Dev] Fwd: [Python-checkins] r51236 - in python/trunk: Doc/api/abstract.tex Include/abstract.h Include/object.h Lib/test/test_index.py Misc/NEWS Modules/arraymodule.c Modules/mmapmodule.c Modules/operator.c Objects/abstract.c Objects/classobject.c Objects/

[Python-Dev] Fwd: [Python-checkins] r51236 - in python/trunk: Doc/api/abstract.tex Include/abstract.h Include/object.h Lib/test/test_index.py Misc/NEWS Modules/arraymodule.c Modules/mmapmodule.c Modules/operator.c Objects/abstract.c Objects/classobject.c Objects/ [Python-Dev] Fwd: [Python-checkins] r51236 - in python/trunk: Doc/api/abstract.tex Include/abstract.h Include/object.h Lib/test/test_index.py Misc/NEWS Modules/arraymodule.c Modules/mmapmodule.c Modules/operator.c Objects/abstract.c Objects/classobject.c Objects/Travis E. Oliphant oliphant.travis at ieee.org
Tue Aug 15 00:28:45 CEST 2006
Travis E. Oliphant wrote:
> 
> The idea is that the __index__() method should return an exact int or 
> exact long or this call will raise an error.  The restriction is present 
> to remove the possibility of infinite recursion (though I'm not sure 
> where that would occur exactly).
> 

I just realized that returning a sub-class of Int and/or Long would not 
be a problem here.  The recursion problem that I was guarding against 
only arose when the possibility of returning any object with an 
.__index__() method was suggested.

Therefore, I think these exact int or exact long checks can and should 
be replaced with PyInt_Check() and PyLong_Check().

-Travis



More information about the Python-Dev mailing list

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