Open robertwb opened 8 years ago
Consider
def debug(fun): print(fun) return fun class A(object): @staticmethod @debug def foo(self): return self
In Python, this correctly prints <function foo at 0x7f4d305df410>. In Cython, this wrongly prints <staticmethod object at 0x7f4d30e5e718>.
<function foo at 0x7f4d305df410>
<staticmethod object at 0x7f4d30e5e718>
When doing the same with a Cython cdef class, the decorators are somehow applied twice: the output becomes
cdef class
<staticmethod object at 0x7f4d30e5eb40> <staticmethod object at 0x7f4d305e52f0>
Migrated from http://trac.cython.org/ticket/880
Consider
In Python, this correctly prints
<function foo at 0x7f4d305df410>
. In Cython, this wrongly prints<staticmethod object at 0x7f4d30e5e718>
.When doing the same with a Cython
cdef class
, the decorators are somehow applied twice: the output becomesMigrated from http://trac.cython.org/ticket/880