Skip to content

ast module docs document private attribute #47402

Closed

Description

@brettcannon
BPO 3152
Nosy @loewis, @brettcannon, @birkenfeld, @rhettinger

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 = 'https://github.com/birkenfeld'
closed_at = <Date 2008-06-20.21:59:49.440>
created_at = <Date 2008-06-20.20:36:33.052>
labels = ['easy', 'type-bug', 'docs']
title = 'ast module docs document private attribute'
updated_at = <Date 2008-06-20.21:59:49.388>
user = 'https://github.com/brettcannon'

bugs.python.org fields:

activity = <Date 2008-06-20.21:59:49.388>
actor = 'loewis'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-06-20.21:59:49.440>
closer = 'loewis'
components = ['Documentation', 'None']
creation = <Date 2008-06-20.20:36:33.052>
creator = 'brett.cannon'
dependencies = []
files = []
hgrepos = []
issue_num = 3152
keywords = ['easy', '26backport']
message_count = 4.0
messages = ['68473', '68474', '68476', '68480']
nosy_count = 4.0
nosy_names = ['loewis', 'brett.cannon', 'georg.brandl', 'rhettinger']
pr_nums = []
priority = 'critical'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue3152'
versions = ['Python 2.6', 'Python 3.0']

Activity

  1. brettcannon commented on Jun 20, 2008

    @brettcannon
    MemberAuthor

    The docs for the ast module document the '_fields' attribute on AST
    instances. Either that documentation needs to go away or the attribute
    needs to be renamed as the leading underscore means it is private to the
    internal API.

  2. added
    docsDocumentation in the Doc dir
    type-bugAn unexpected behavior, bug, or error
    on Jun 20, 2008
  3. birkenfeld commented on Jun 20, 2008

    @birkenfeld
    Member

    I disagree. The AST classes are auto-generated, the leading underscore
    of _fields is there to avoid clashes with field names from the AST types.

    This is similar to
    http://docs.python.org/dev/library/collections#collections.somenamedtuple.\_fields
    which shouldn't be renamed, but isn't private either.

  4. rhettinger commented on Jun 20, 2008

    @rhettinger
    Contributor

    This is consistent with the methods in named tuples (also to avoid name
    clashes).

  5. loewis commented on Jun 20, 2008

    loewismannequin
    Mannequin

    I agree with Georg and Raymond, closing this as "won't fix".

  6. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc direasytype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions