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/2005-February/051669.html below:

[Python-Dev] Fixing _PyEval_SliceIndex so that integer-like objects can be used

[Python-Dev] Fixing _PyEval_SliceIndex so that integer-like objects can be used [Python-Dev] Fixing _PyEval_SliceIndex so that integer-like objects can be usedTravis Oliphant oliphant at ee.byu.edu
Fri Feb 18 22:12:53 CET 2005
Hello again,

There is a great discussion going on the numpy list regarding a proposed 
PEP for multidimensional arrays that is in the works.

During this discussion as resurfaced regarding slicing with objects that 
are not IntegerType objects but that
have a tp_as_number->nb_int method to convert to an int. 

Would it be possible to change

_PyEval_SliceIndex  in ceval.c

so that rather than throwing an error if the indexing object is not an 
integer, the code first checks to see if the object has a
tp_as_number->nb_int method and calls it instead.

If this is acceptable, it is an easy patch.

Thanks,

-Travis Oliphant

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