Re: [Cython] Compiler crash: forward declaration of cdef class with "public" attributes

2014-07-23 Thread Alok Singhal
On Wed, Jul 23, 2014 at 8:28 AM, Robert Bradshaw wrote: >> Also, if forward declarations are not recommended, what is the best >> way to declare two cdef classes that need to know about each other? >> (Short of "don't do that!" :-) ). > > Just do it without the forward declarations. Thanks! I di

Re: [Cython] Compiler crash: forward declaration of cdef class with "public" attributes

2014-07-23 Thread Alok Singhal
On Tue, Jul 22, 2014 at 11:42 PM, Robert Bradshaw wrote: > On Tue, Jul 8, 2014 at 4:34 PM, Alok Singhal wrote: > > Thanks. > https://github.com/cython/cython/commit/967c8e11da94ddae1ea7f1524f6beef2e030c4d9 Thanks for the fix! > FWIW, forward declarations should not generally

[Cython] Compiler crash: forward declaration of cdef class with "public" attributes

2014-07-08 Thread Alok Singhal
Hi, I am getting a compiler crash with the following code: $ cat foo.pxd cdef class Foo: cdef public object x $ cat foo.pyx cdef class Foo cdef class Foo: pass $ ./cython.py foo.pyx Error compiling Cython file: ... cdef class

[Cython] Bug(?): chained assignments and tuple unpacking

2013-04-10 Thread Alok Singhal
Hi, The following code (also attached as a .pyx file) fails in the current Cython : cdef class test: pass def main(): cdef test a, b, c, d (a, b) = (c, d) = (None, None) When run, I get the following traceback: In [1]: import assign_test In [2]: assign_test.main() Traceback (most r