GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect description about scope related with inheritance · Issue #73196 · python/cpython

Incorrect description about scope related with inheritance #73196

New issue
Copy link
New issue
Copy link
Closed
Closed
Incorrect description about scope related with inheritance#73196
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc direasy

Description

wooyoo
mannequin
opened on Dec 19, 2016
Issue body actions
BPO 29010
Nosy @bitdancer, @brendan-donegan, @brendan-donegan

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-12-19.04:45:33.115>
labels = ['easy', '3.11', '3.9', '3.10', 'docs']
title = 'Incorrect description about scope related with inheritance'
updated_at = <Date 2021-11-19.17:34:43.264>
user = 'https://bugs.python.org/wooyoo'

bugs.python.org fields:

activity = <Date 2021-11-19.17:34:43.264>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2016-12-19.04:45:33.115>
creator = 'woo yoo'
dependencies = []
files = []
hgrepos = []
issue_num = 29010
keywords = ['easy', 'newcomer friendly']
message_count = 12.0
messages = ['283580', '283581', '283596', '283621', '283622', '283623', '283663', '283666', '283667', '283691', '283694', '283696']
nosy_count = 5.0
nosy_names = ['r.david.murray', 'docs@python', 'woo yoo', 'brendan-donegan', 'brendand']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue29010'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Activity

  1. wooyoo commented on Dec 19, 2016

    @wooyoo
    wooyoomannequin
    on Dec 19, 2016
    MannequinAuthor
    More actions

    The current description is "The name BaseClassName must be defined in a scope containing the derived class definition", which did not conform to the actual situation ,e.g. the base class object is not in the same scope as the derived class.

  2. wooyoo commented on Dec 19, 2016

    @wooyoo
    wooyoomannequin
    on Dec 19, 2016
    MannequinAuthor
    More actions

    The associated link is https://docs.python.org/3.6/tutorial/classes.html#inheritance

  3. wooyoo
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Dec 19, 2016
  4. wooyoo
    assigned
    docspython
    on Dec 19, 2016
  5. brendan-donegan commented on Dec 19, 2016

    @brendan-donegan
    brendan-doneganmannequin
    on Dec 19, 2016
    Mannequin
    More actions

    Hi. Can you please provide a small code snippet illustrating where this diverges from the actual behaviour?

  6. wooyoo commented on Dec 19, 2016

    @wooyoo
    wooyoomannequin
    on Dec 19, 2016
    MannequinAuthor
    More actions

    Code:

    class A(object):
    pass

    'object' is not in the same scope as 'A'

  7. bitdancer commented on Dec 19, 2016

    @bitdancer
    bitdancer
    on Dec 19, 2016
    Member
    More actions

    It is part of the global scope, which contains all other scopes. (I'm not 100% sure I'm comfortable with that language, but it doesn't seem obviously wrong.)

  8. wooyoo commented on Dec 19, 2016

    @wooyoo
    wooyoomannequin
    on Dec 19, 2016
    MannequinAuthor
    More actions

    The previous description about scope classify it into 3 types explicitly, which means the scope containing the current module's global names is not same as the scope containing built-in names.

  9. wooyoo commented on Dec 20, 2016

    @wooyoo
    wooyoomannequin
    on Dec 20, 2016
    MannequinAuthor
    More actions

    If i was wrong about this issue, please tell me.

  10. brendan-donegan commented on Dec 20, 2016

    @brendan-donegan
    brendan-doneganmannequin
    on Dec 20, 2016
    Mannequin
    More actions

    IMO there's no actual bug in Python. Perhaps documentation can be clarified
    in a short simple way. I would reiterate the point that restating facts of
    the language all over the documentation is not a great idea, but maybe here
    the benefits outweigh the drawbacks.

    Anyway I think the bug is clear now (it's a docs issue if anything) so I'd
    leave it open until someone offers a patch or a strong argument why it
    shouldn't be clarified.

    On Tue, 20 Dec 2016 at 09:18 woo yoo <[email protected]> wrote:

    woo yoo added the comment:

    If i was wrong about this issue, please tell me.

    ----------


    Python tracker <[email protected]>
    <http://bugs.python.org/issue29010\>


  11. wooyoo commented on Dec 20, 2016

    @wooyoo
    wooyoomannequin
    on Dec 20, 2016
    MannequinAuthor
    More actions

    I agree with you

  12. bitdancer commented on Dec 20, 2016

    @bitdancer
    bitdancer
    on Dec 20, 2016
    Member
    More actions

    Would it make it clearer if we said "BaseClassName must be defined in a namespace accessible from the scope containing the dervied class definition" ?

  13. brendan-donegan commented on Dec 20, 2016

    @brendan-donegan
    brendan-doneganmannequin
    on Dec 20, 2016
    Mannequin
    More actions

    Worth putting them side by side I think:

    "The name BaseClassName must be defined in a scope containing the derived class definition"

    vs.

    "BaseClassName must be defined in a namespace accessible from the scope containing the derived class definition"

  14. wooyoo commented on Dec 20, 2016

    @wooyoo
    wooyoomannequin
    on Dec 20, 2016
    MannequinAuthor
    More actions

    As for me, i prefer the new description, which is clear and easy to understand.

  15. iritkatriel
    added
    easy
    3.9 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    3.11only security fixesonly security fixes
    on Nov 19, 2021
  16. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  17. nanjekyejoannah
    added a commit that references this issue on Oct 7, 2022

    gh-73196: Add namespace/scope clarification for inheritance section (#…

    fde74be
  18. slateny
    closed this as completedon Oct 8, 2022
  19. carljm
    added a commit that references this issue on Oct 8, 2022

    Merge branch 'main' into typewatch

    27a4980
  20. mpage
    added a commit that references this issue on Oct 11, 2022

    pythongh-73196: Add namespace/scope clarification for inheritance sec…

    0085f20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc direasy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.