[Python-Dev] index clipping (original) (raw)
Travis E. Oliphant oliphant.travis at ieee.org
Fri Aug 11 06:07:57 CEST 2006
- Previous message: [Python-Dev] __index__ clipping
- Next message: [Python-Dev] __index__ clipping
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
Thanks for your understanding.
Anyway, Nick's patch differs in at least one significant way from my proposal -- (10**10).index() returns sys.maxint in his patch, while I want it to return 10000000000L. So this is still an open issue.
I've reviewed Nick's patch and finally see the light for the need of nb_index to return a Python object. It also nicely parallels nb_int and nb_long so the same code can often be used (when it's appropriate for the object to be an integer).
I understand the general rationale for the C-API, but I share reservations about using output arguments to convey error information. This seems quite a bit different from what Python normally does.
I am going to beef up PEP-357 to address the main problem of nb_index returning a Py_ssize_t and then look at the C-API question more closely.
I'm also going out of town next week (and have a bunch to prepare for it) so I'll only have a few hours to look at it.
-Travis
- Previous message: [Python-Dev] __index__ clipping
- Next message: [Python-Dev] __index__ clipping
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]