[issue39999] Fix some issues with AST node classes

Batuhan Taskaya report at bugs.python.org
Wed Mar 18 05:51:01 EDT 2020


Batuhan Taskaya <batuhanosmantaskaya at gmail.com> added the comment:

> 1. Re-add removed classes Suite, Param, AugLoad and AugStore. They are not used in Python 3, are not created by the parser and are not accepted by the compiler. Param was used in 2.7, other classes were not used longer time. But some third-party projects (e.g. pyflakes) use them for isinstance checks.

I dont think Suite used in anywhere related to CPython, and for others (Param and AugXXXX contexts, which both used in pyflakes) I dont think it is necessary to have them. For most of the part they can just do this

if not PY27:
     class Param(ast.expr_context): pass

and looks like pyflakes already have a PR about this (not this way, but it is common to have version-specific conditions in AST tools).

----------
nosy: +BTaskaya

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39999>
_______________________________________


More information about the Python-bugs-list mailing list