|
Re: How to specify __contains__ method?: msg#00015python.pyrex
Great. That fixes the first problem. I found that line but didn't see how to change it. I'll see if I can figure out the compiler so I can help with this kind of stuff. Now the second problem still remains. That is demonstrated by: cdef class foo: cdef int val def __init__(self): self.val = 0 cdef class fee(foo): def bof(self): print 'fee bof', self.val cdef class faa(fee): def bof(self): print 'foo bof', self.val Now at the python command prompt: fee bof 0import bug2 faa boffaa.bof() Traceback (most recent call last): File "<stdin>", line 1, in ? File "d:\msl\gb\python\my\Matrix\bug2.pyx", line 17, in bug2.faa.bof print 'bof', self.val AttributeError: 'bug2.faa' object has no attribute 'val' faa appears to not realize it has direct access to self.val. Thanks gb On Sun, 11 Apr 2004 21:40:01 +0200 "Andreas Kostyrka" <andreas@xxxxxxxxx> wrote: Am So, den 11.04.2004 schrieb Gary Bishop um 20:43: Ok, in Pyrex/Compiler/TypeSlots.py look for a line like that: |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Team Pyrex Mission Statement: 00015, Paul Prescod |
|---|---|
| Next by Date: | Re: Kate? or other Linux editor?: 00015, Arnd Zapletal |
| Previous by Thread: | Re: How to specify __contains__ method?i: 00015, Greg Ewing |
| Next by Thread: | Team Pyrex Mission Statement: 00015, Paul Prescod |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |