▲ | ojii 3 months ago | ||||||||||||||||
One tiny correction: > decorators are functions that take a callable argument and return a new callable there's nothing forcing a decorator to return a callable. A decorator _could_ return anything it wants. I don't know why you would want that, but Python won't stop you. | |||||||||||||||||
▲ | backprojection 3 months ago | parent [-] | ||||||||||||||||
They also don’t have to act on callables, see @dataclass for instance. | |||||||||||||||||
|