How do I give a decorator acces to the class of a decorated function

Antoon Pardon antoon.pardon at vub.be
Wed Sep 4 10:21:00 EDT 2019


What I am trying to do is the following.

class MyClass (...) :
    @register
    def MyFunction(...)
        ...

What I would want is for the register decorator to somehow create/mutate
class variable(s) of MyClass.

Is that possible or do I have to rethink my approach?

-- 
Antoon Pardon.




More information about the Python-list mailing list