-
Notifications
You must be signed in to change notification settings - Fork 33
much simpler solution to extreme-self-casting
#83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Exactly 😃
|
The default solution is for Python < 3.12. Though, not quite sure I totally get your point. If you mean to use solution2.py as the default solution, I'm fine with it (feel free to make a PR) |
here's a python < 3.12 solution which also doesn't require annotating self: from typing import *
R = TypeVar('R')
P = ParamSpec('P')
class Fn(Generic[R, P]):
def __init__(self, f: Callable[P, R]):
self.f = f
def transform_callable(self) -> Callable[Concatenate[object, P], R]:
... |
Yep, looks good to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this one felt a bit too easy -- I'm not sure how to change the problem to ...
The text was updated successfully, but these errors were encountered: