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
Add notes maintaining ABCs #92736
Add notes maintaining ABCs #92736
Conversation
Lib/_collections_abc.py
Outdated
# Though irritating, the correct procedure for adding new abstract or | ||
# mixin methods is to create a new class as a subclass of the previous | ||
# class. For example, union(), intersection(), and difference() cannot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd replace "class" with "ABC" in both occurrences in this sentence, assuming that's what you meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
# | ||
# Though classes that inherit from an ABC would automatically receive a | ||
# new mixin method, registered classes would become non-compliant and | ||
# violate the contract promised by ``isinstance(someobj, SomeABC)``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
We have a recurring issue where new maintainers aspire to modify the ABCs without understanding the implications. Adding some notes for the ABC maintenance facts-of-life.