Re: Bug in PySequence indexing
Greg Ewing <[email protected]> Fri, 30 May 2008 12:54:16 +1200
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Organization | University of Canterbury | Te Whare Wananga o Waitaha |
| Message-ID | <[email protected]> |
Robert Bradshaw wrote:
> cdef unsigned long n = 4000000000
> D = { n: "positive" }
> print D[n]
I'll have to think more about this. I'm not sure what the
right solution is. Maybe only do the optimisation when the
index is a signed int type, or have two different runtime
functions for the signed and unsigned case.
What does your implementation do in the unsigned case?
Fall back on PyObject_GetItem?
--
Greg