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
<type 'builtin_function_or_method'>, and such methods have no
func_defaults attribute, which is used in sage.misc.function_mangling.

How hard would it be to get cached_methods working for Cython files?
David

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to