-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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-12634: Clarify an awkward section of the tutorial #15406
Conversation
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 think is a good improvement.
it is wise to use some kind of convention that minimizes the chance of | ||
conflicts. Possible conventions include capitalizing method names, prefixing | ||
data attribute names with a small unique string (perhaps just an underscore), or | ||
using verbs for methods and nouns for data attributes. |
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.
Wow. At first I was confused. If one defines module, class, or instance attributes with the same name, the second wins. Then the first two advice items are wrong, the third correct, but misses the realistic case of noun data attribute duplication on class and instance. Your example covers that nicely. Please apply and backport.
When you're done making the requested changes, leave the comment: |
Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-15409 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 483ae0c) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
https://bugs.python.org/issue12634