-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
bpo-30449 Terse slots #1819
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
bpo-30449 Terse slots #1819
Conversation
@aaronchall, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @ncoghlan and @1st1 to be potential reviewers. |
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.
Overall, this looks great. Please do fix the one comment on the use of mapping.
Doc/reference/datamodel.rst
Outdated
for the declared variables and prevents the automatic creation of *__dict__* | ||
and *__weakref__* for each instance. | ||
This class variable can be assigned a string, iterable, sequence of | ||
strings, or mapping with variable names used by instances. |
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 would suggest leaving out mapping. That possibility is covered by iterable without suggesting that a mapping would be a good thing to do (because order isn't guaranteed, because the values aren't used, and because it doesn't make much sense semantically).
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.
Data
Will this documentation improvement be backported to 2.7 and 3.6? |
Thanks @aaronchall for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Thanks @aaronchall for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
Sorry, @aaronchall and @rhettinger, I could not cleanly backport this to |
GH-5815 is a backport of this pull request to the 3.6 branch. |
* correct __slots__ documentation with minimal changes * add multiple inheritance info * remove mapping from description (cherry picked from commit 2b44e30) Co-authored-by: Aaron Hall, MBA <aaronchall@yahoo.com>
Less exposition, info for multiple inheritance, still terse, more correct.
Linked issue: gh-74634