Skip to content

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

Merged
merged 3 commits into from
May 26, 2017
Merged

bpo-30449 Terse slots #1819

merged 3 commits into from
May 26, 2017

Conversation

aaronchall
Copy link
Contributor

@aaronchall aaronchall commented May 25, 2017

Less exposition, info for multiple inheritance, still terse, more correct.

Linked issue: gh-74634

@mention-bot
Copy link

@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.

@aaronchall aaronchall changed the title Terse slots bpo-30449 Terse slots May 25, 2017
Copy link
Contributor

@rhettinger rhettinger left a 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.

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.
Copy link
Contributor

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).

@rhettinger rhettinger self-assigned this May 26, 2017
@rhettinger rhettinger merged commit 2b44e30 into python:master May 26, 2017
Copy link

@rjkmurray rjkmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data

@aaronchall aaronchall deleted the terse_slots branch May 28, 2017 01:51
@aaronchall
Copy link
Contributor Author

Will this documentation improvement be backported to 2.7 and 3.6?

@miss-islington
Copy link
Contributor

Thanks @aaronchall for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @aaronchall for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @aaronchall and @rhettinger, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 2b44e302ec3079363c4d5c875677945953705c58 2.7

@bedevere-bot
Copy link

GH-5815 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 22, 2018
* 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>
Mariatta pushed a commit that referenced this pull request Feb 22, 2018
(cherry picked from commit 2b44e30)


Co-authored-by: Aaron Hall, MBA <aaronchall@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy