Remix.run Logo
ojii 2 days 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 2 days ago | parent [-]

They also don’t have to act on callables, see @dataclass for instance.

ojii 2 days ago | parent [-]

Classes are callable.