Re: [sage-devel] cached methods in cython

2015-02-19 Thread Vincent Delecroix
Which Sage version are you using? The following code is ok for me on sage-6.6.beta0 sage: K=GF(5) sage: K.factored_order() 5 Vincent 2015-02-19 20:00 UTC+01:00, Antonio Rojas : > Hi, > Cached methods in cython modules don't work if the cython source is not > available: > > sage: K=GF(5) > sage

[sage-devel] cached methods in cython

2015-02-19 Thread Antonio Rojas
Hi, Cached methods in cython modules don't work if the cython source is not available: sage: K=GF(5) sage: K.factored_order() --- AttributeErrorTraceback (most recent call last) [...] AttributeErr

[sage-devel] Cached methods in Cython files

2011-12-09 Thread David Roe
I'd like the following to work (in a Cython file): from sage.misc.cachefunc import cached_method from sage.rings.arith import factor cdef class A: @cached_method def expensive(self): return factor(10^5000 + 41) Currently it fails since the type of a def method on a cython class is