|
|
|
|
|
by akdor1154
1582 days ago
|
|
I was gonna say cool for FP guys but alien to the Python world, but then i saw the f(..., x=1) syntax and decided you're a genius. Really nice idea. In practice i worry about static checkers and IDE param hints though, how have you fared with these? Not your fault at all, but mypy/pyright have very poor support for wrappers like this, and in IDEs it's common for their arg hints to devolve to a copout (args, kwargs) as well. |
|
You might be able to annotate it accurately with generics, ParamSpec and Concatenate[1].
[1] https://www.python.org/dev/peps/pep-0612/