Skip to content

enhancements decorators

DagSverreSeljebotn edited this page · 3 revisions
Clone this wiki locally


  • Status: Support for functions implemented

This is low-hanging fruit, especially now that classmethods have been done.



def eggs(...):

Turns into

def eggs(...):
eggs = spam(eggs)

but with eggs being stored in a temporary variable rather than the given scope. There is a little trickery because function are not actually defined on the fly at runtime, but it shouldn't be too bad.

StefanBehnel: The funny thing is that class decorators should even be easier to implement than function decorators.

Something went wrong with that request. Please try again.