Skip to content

Decorators applied twice when binding=True #1679

@jdemeyer

Description

@jdemeyer

The debug decorator just prints whatever is passed through.

def debug(obj):
    print(obj)
    return obj

cimport cython
@cython.binding(True)
cdef class X:
    @debug
    def method(self): pass

Output:

<cyfunction X.method at 0x7f08aceb9050>
<unbound method X.method>

Expected output:

<cyfunction X.method at 0x7f08aceb9050>

Possibly related to #1274 and #1434.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions