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

_______________________________________________
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