3 Comments

I like the idea of decorators. But last I checked my PyCharm doesn't do type checking on decorated functions/methods. It doesn't give any information on the function parameters either. I think this is because technically the "replacement" function that wraps the original can have a completely different set of parameters. So that's a shame :/

Expand full comment

It should improve as more and more people adopt ParamSpec: https://peps.python.org/pep-0612/

Expand full comment

Awesome, that indeed solves the issues I mentioned, I think. And it is already available in Python 3.10 onwards I see. Will definitely play around with this!

Expand full comment