On 2016-01-10 20:36, Volker Braun wrote:
> 1) don't cdef class attributes, it just makes debugging unnecessary
> hard. Unless you are wrapping C-level types where you can't avoid it, of
> course. Just keep it in python, maybe use cpdef if you must.

Ok.

> 2) I'd recommend using __cinit__ instead of __init__ with cdef classes
> and use more of a RAII-style design. The cython ctor is always is
> called, the python ctor not necessarily! You are calling
> lazy_list_abstract.__new__ a couple of times and not manually
> initializing self.name, this is where your None (NULL in C) string
> attributes come from.

Thanks; it works now.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to