-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-124652: partialmethod simplifications #124788
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
base: main
Are you sure you want to change the base?
Conversation
a04c14f
to
d217592
Compare
Removed keyword Placeholder restriction from this and will issue a separate PR after. Felt like too much is packed into 1 PR. |
@dg-pb Is this PR still relevant or have you opened PRs for the different components? If so, can we close this one? |
It is still relevant. I could factor "allowing trailing placeholders" into a separate one if it is preferred. |
I have not looked at all the changes in detail, but the PR seems big and that could be a reason this PR has not yet been reviewed. In the description at least 3 changes are mentioned (allowing placeholders, performance, refactor for |
There are 2 really. Performance benefit is a consequence of "allowing trailing placeholders". I don't mind making changes, splitting as desired etc, but I would like these to be called by reviewer. Otherwise, I already have experience by trying to guess what reviewer might prefer, making changes per suggestions of others, etc and when final reviewer comes he desires to be different again and I need to keep changing things more times than necessary. And either way these would need to be considered at the same time. I.e. allowing or not allowing trailing placeholders are both ok. There is a slight advantage for allowing them as it makes it a bit more flexible and explicit. While looking at Also, if I split now, then I have PRs hanging on unmerged code.
It isn't that big. Most of it is Pure Python rewrite of |
As this series of |
partial
(makes use ofpartial
instead of containing any complexities of partial)inspect
partial
objects)partialmethod
Benchmarks:Setup
functools.partialmethod
simplification #124652