Hi Jeroen,
On 2017-08-25, Jeroen Demeyer wrote:
> On 2017-08-25 13:37, Simon King wrote:
>> Not much, actually:
>
> My point was that a __dict__ makes any attribute access slower, not just
> this lazy attribute. It will also seriously slow down cpdef methods.
OK, if it
On 2017-08-25 13:37, Simon King wrote:
Not much, actually:
My point was that a __dict__ makes any attribute access slower, not just
this lazy attribute. It will also seriously slow down cpdef methods.
--
You received this message because you are subscribed to the Google Groups
"sage-devel"
Hi Jeroen,
On 2017-08-25, Jeroen Demeyer wrote:
> One workaround is adding a __dict__:
> ...
> This does make everything slower though, so I guess it's not what you want.
Not much, actually:
sage: cython("""
: from sage.structure.element cimport Element
: cdef
On 2017-08-25 13:07, Simon King wrote:
Hi!
I just realise that @property works for Cython, and it is
competitive!
Indeed. Cython has optimized code to deal with standard decorators like
@staticmethod, @classmethod and @property.
The reason that lazy_import does not work for Cython classes
Hi!
I just realise that @property works for Cython, and it is
competitive! Namely:
sage: cython("""
: from sage.structure.element cimport Element
: cdef class CyElement(Element):
: cdef object _test
: def __init__(self, P):
: Element.__init__(self,P)
: