-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Clarify that Set._from_iterable is not required to be a classmethod. #23272
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
Clarify that Set._from_iterable is not required to be a classmethod. #23272
Conversation
In the implementation, `_from_iterable` is only used via `self`, and requiring `_from_iterable` to be a classmethod makes it of little value to subclasses with different constructor signatures.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
* Restore mention default impl is class doc * Rephrase to say impl can be class or regular method * Add tests to verify instance method _from_iterable works
I have made the requested changes; please review again |
Thanks for making the requested changes! @rhettinger: please review the changes made to this pull request. |
Thanks @rickeylev for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
GH-23450 is a backport of this pull request to the 3.9 branch. |
…ythonGH-23272) (cherry picked from commit 68f68fa) Co-authored-by: Richard Levasseur <richardlev@gmail.com>
In the implementation,
_from_iterable
is only used viaself
, andrequiring
_from_iterable
to be a classmethod makes it of littlevalue to subclasses with different constructor signatures.