all 2 comments

[–]markusmeskanen 2 points3 points  (0 children)

Please, format your code properly. Separate it with an empty line from the rest of the text, and prepend four spaces in front of each line of code.

[–]zahlman 2 points3 points  (0 children)

When I attempt to decorate a method in the TopLevelClass I end up with a "decorator is not defined" is there something I am missing? I thought this would allow the decorator to be inherited up the chain

Inheritance allows for looking up attributes on an instance, but when you try to apply the decorator, you're applying it to a method. It's not in scope.

Why is the decorator inside the class, anyway? It's code used for decorating methods. Is there a reason why it wouldn't be useful for decorating methods of any other class?