homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ast module docs document private attribute
Type: behavior Stage:
Components: None, Documentation Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: brett.cannon, georg.brandl, loewis, rhettinger
Priority: critical Keywords: 26backport, easy

Created on 2008年06月20日 20:36 by brett.cannon, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (4)
msg68473 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008年06月20日 20:36
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.
msg68474 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008年06月20日 20:41
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.
msg68476 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008年06月20日 21:04
This is consistent with the methods in named tuples (also to avoid name 
clashes).
msg68480 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008年06月20日 21:59
I agree with Georg and Raymond, closing this as "won't fix".
History
Date User Action Args
2022年04月11日 14:56:35adminsetgithub: 47402
2008年06月20日 21:59:49loewissetstatus: open -> closed
nosy: + loewis
resolution: wont fix
messages: + msg68480
2008年06月20日 21:04:27rhettingersetkeywords: + 26backport
nosy: + rhettinger
messages: + msg68476
components: + None
2008年06月20日 20:41:32georg.brandlsetmessages: + msg68474
2008年06月20日 20:36:33brett.cannoncreate

AltStyle によって変換されたページ (->オリジナル) /