Skip to content
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

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Aug 22, 2019

Copy link
Contributor

@eamanu eamanu left a 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.
Copy link
Member

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.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@rhettinger rhettinger merged commit 483ae0c into python:master Aug 23, 2019
@rhettinger rhettinger deleted the tutorial_random_remarks branch August 23, 2019 06:27
@miss-islington
Copy link
Contributor

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-15409 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 23, 2019
(cherry picked from commit 483ae0c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
rhettinger added a commit that referenced this pull request Aug 23, 2019
…15409)

(cherry picked from commit 483ae0c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants