2 ms·
In Python, the decorator syntax is literally just syntactic sugar. This: @some_decorator def some_func(): pass Is equivalent to this: de
by ubernostrum 11y ago
In Python, the decorator syntax is literally just syntactic sugar.
This:
@some_decorator
def some_func():
pass
Is equivalent to this:
def some_func():
pass
some_func = some_decorator(some_func)