decorators and multimethods
michele.simionato at gmail.com
Sun Aug 8 15:31:31 CEST 2004
Ronald Oussoren <ronaldoussoren at mac.com> wrote in message news:<mailman.1337.1091896218.5135.python-list at python.org>...
> decorators are called before the function is added to
> a namespace
You are right. I did some experiment with
and it is clear that
is NOT the same as
Using the @decorator, f is not in the globals at the decorator call time.
In the version of the PEP I have read (that my have changed) complete
equivalence was claimed, so I assumed (wrongly) this was the cause of
the error I saw. Instead the error came from the second call to the
decorator, not from the first one.
More information about the Python-list