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
On Thu, Dec 17, 2020 at 12:26:21PM -0500, Ricky Teachey wrote:
> I really like this idea!
>
> I have very often had to create my own MISSING global in modules where None
> might actually be a legitimate value for the dataclass member.
I'm sorry Ricky, perhaps I'm missing something here, but I can
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