Re: [Cython] (Possible) bug: module level global vars end up in upper scope?

2016-07-27 Thread Yury V. Zaytsev
Hi Stefan, On Wed, 27 Jul 2016, Stefan Behnel wrote: I wonder if we shouldn't consider the module init function a special (enough) case here that is never performance critical, and just always generate a frame for it. Later frame lookups would then still fail (so we'd create somewhat of an inco

Re: [Cython] (Possible) bug: module level global vars end up in upper scope?

2016-07-27 Thread Stefan Behnel
Yury V. Zaytsev schrieb am 25.07.2016 um 15:27: > I've hit the following deviation from Python 2: when a Cython module has a > global variable, somehow, upon importing the module, the global variables > end up in the *current* (importing) module scope, rather than *imported* > module scope, and, wh

[Cython] BUG: cannot override cdef by cpdef method in .pxd

2016-07-27 Thread Jeroen Demeyer
Hello, I recently learned from Robert Bradshaw that it is legal in Cython to override cdef methods by cpdef methods. But doing this in a .pxd file causes a compile-time error: *foo.pyx*: cdef class Base(object): cdef meth(self): print("Base.meth()") cdef class Derived(Base):