Paolino wrote:
> Maybe it's possible to let the decorator know the method class even if
> the class is still undefined.(Just like recursive functions?)
No, it's not possible. The situation is not the same. With
recursive functions, both functions are defined before
either of them is called. But
> Maybe it's possible to let the decorator know the method class even if
> the class is still undefined.(Just like recursive functions?)
> This would allow decorators to call super with the right class also.
> @callSuper decoration is something I really miss.
You're thinking about it all wrong.
R
Paolino wrote:
> I noticed (via using them) that decorations are applied to methods
> before they become methods.
>
> This choice flattens down the implementation to no differentiating
> methods from functions.
>
>
>
> 1)
> I have to apply euristics on the wrapped function type when I use the
Paolino wrote:
> I imagine that a method implementation of them inside the type metaclass
> could be better specified by people.
What you ask for is unimplementable. Method objects are created only
when the method is accessed, not (even) when the class is created.
Watch this:
>>> class X:
... d
I noticed (via using them) that decorations are applied to methods
before they become methods.
This choice flattens down the implementation to no differentiating
methods from functions.
1)
I have to apply euristics on the wrapped function type when I use the
function as an index key.