Really sorry for the extremely stupid title, but if I know what it is, I wouldn't write here (:
def some_decorator( func ):
# ..
class A:
@some_decorator
def func():
pass
@func.some_decorator # this one here - func.some_decorator ?
def func():
pass
some_decorator
decorates func
- that's OK. But what is func.some_decorator
and how some_decorator
becomes a member ( or something else ? ) of func
?
P.S. I'm 90% sure, that there's such question here (as this seems something basic), but I don't know how to search it. If there's a exact duplicate, I'll delete this question.
Note : It's not typo, nor accident, that both member functions are named func
. The decorator is for overloading: the question is related to Decorating method (class methods overloading)