Live view
Basically an everyday occurrence.
Writing everyday on docs…posting on WebNovel.
Just doing it right?
Just scrolling to the bottom to write the next chapter
Basically an everyday occurrence.
Writing everyday on docs…posting on WebNovel.
Just doing it right?
Just scrolling to the bottom to write the next chapter
Right now we use @ to signify one thing,
The thing below us in a callable.
I suggest this
from Typing import TypeVar, TypeVarTuple, ParamSpec, Callable
T = TypeVar(“T”)
Ts = TypeVarTup(“Ts”)
P = ParamSpec(“P”)
C = Callable(“C”)
def decorate(func : C[P, R) -> C[P, R]:
def inner(*args :P.args, **kwargs : Pkwargs) -> C[P, R]:
#before
res = func(*args, **kwargs):
#after
return res
return inner
Using inline Syntax the equivalent should be
def decorate[T, *Ts, **P, @C](func : C[P, R])-> C[P, R]:
def inner(*args :P.args, **kwargs : Pkwargs) -> C[P, R]:
#before
res = func(*args, **kwargs):
#after
return res
return inner
Seems simple just add @ to mean callable in that place.
And it as common as ParamSpec, if not more common.
No discussion.
Just feels good.
Don't care if you like it. Just yep.