Marco Sulla writes:
> Maybe it's a crazy idea, but what if we could decorate a single line
> of code?
> For example:
>
> @Timer
> a = time_consuming_function()
As syntax, I don't see the advantage over
with ContextManagingTimer():
a = time_consuming_function()
I don't underst
Maybe it's a crazy idea, but what if we could decorate a single line
of code? For example:
@Timer
a = time_consuming_function()
This will be equivalent to using Steven's context manager, but the
decorator is more simple to comment and uncomment.
Maybe it could be possible to comment also code bl