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 for arguments shows extra element
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.8
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, jgfoster, pablogsal
Priority: normal Keywords:

Created on 2020-07-27 21:36 by jgfoster, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg374425 - (view) Author: James Foster (jgfoster) Date: 2020-07-27 21:36
https://docs.python.org/3.8/library/ast.html shows seven elements:
    arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,
                 expr* kw_defaults, arg? kwarg, expr* defaults)

https://docs.python.org/3.7/library/ast.html shows six elements:
    arguments = (arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults,
                 arg? kwarg, expr* defaults)

based on ast.c:1479 I believe that six is the proper number and that the first element ("arg* posonlyargs, ") is a duplicate of the second element ("arg* args, ") and should be removed.
msg374426 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-07-27 21:42
(arg* posonlyargs) is correct and was added to 3.8 as part of https://www.python.org/dev/peps/pep-0570/
History
Date User Action Args
2022-04-11 14:59:34adminsetgithub: 85586
2020-07-27 21:42:41pablogsalsetstatus: open -> closed

nosy: + pablogsal
messages: + msg374426

resolution: not a bug
stage: resolved
2020-07-27 21:36:15jgfostercreate