transform a "normal" decorator in one for async functions

vito.detullio at gmail.com vito.detullio at gmail.com
Tue Sep 18 11:36:01 EDT 2018


Il giorno martedì 18 settembre 2018 17:15:22 UTC+2, Thomas Jollans ha scritto:

> > but I cannot rewrite this library.
> 
> Perhaps not, but surely you can write your own decorator that does
> whatever this library's decorator does for async functions? Presumably
> you have the code...

well, maybe? While I could have access to the sources, I don't want to "maintain" (part of) this library.
Worst even if I need to maintain it in my project, and not upstream.

> > is there a way to "convert" a "normal" decorator in one that can handle async functions?
> In general? No.

Ouch.

I'm new to the "async" world, but so this mean that all of the (appliable) decorators present in the various libraries have to be "paired" with async versions?



More information about the Python-list mailing list