On Thu, Oct 23, 2008 at 09:06:27PM -0700, C. Titus Brown wrote:
-> -> -> This error message is puzzling.  The Python 2.6 docs explicitly  
-> -> -> support the use of del on a dict object:
-> -> -> "del d[key]
-> -> ->      Remove d[key] from d. Raises a KeyError if key is not in the map."
-> -> -> 
-> -> -> Also, it's hard to see how all the megatests could pass if such a  
-> -> -> basic language feature were removed in 2.6.  This message sounds like  
-> -> -> a bug to me... but whose bug?  My first guess is that this might be a  
-> -> -> Python 2.6 bug, since it's still quite new...
-> -> 
-> -> This is almost certainly due to a Pyrex version upgrade; it's the same
-> -> kind of error I tracked down for the seqdb cache.
-> 
-> OK, figured it out... this is a pyrex bug related to an optimization for
-> indexing maps with C integers.

Specifically, this code fails:

--
cdef class Test:
    def do_del(self):                   # fails: del d[key] with C int key
        cdef int key

        key = 0

        d = {}
        d[key] = 'foo'
        del d[key]
--

I'll pass it on to the Pyrex list.

cheers,
--titus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to