-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Code GenerationP: blockerPython SemanticsGeneral Python (3) language semanticsGeneral Python (3) language semanticsdefect
Description
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>
.
When doing the same with a Cython cdef class
, the decorators are somehow applied twice: the output becomes
<staticmethod object at 0x7f4d30e5eb40>
<staticmethod object at 0x7f4d305e52f0>
Migrated from http://trac.cython.org/ticket/880
holzkohlengrill, juliusHuelsmann, crazyyao0, ArtificialNotImbecile, tanjuntao and 2 more
Metadata
Metadata
Assignees
Labels
Code GenerationP: blockerPython SemanticsGeneral Python (3) language semanticsGeneral Python (3) language semanticsdefect