[issue41022] AST sum types is unidentifiable after ast.Constant became a base class
Batuhan Taskaya
report at bugs.python.org
Thu Jun 18 05:38:01 EDT 2020
New submission from Batuhan Taskaya <isidentical at gmail.com>:
Previously (before ast.Constant became a base class for deprecated node classes), Sum types were identifiable with this rule;
len(node_class.__subclasses__()) > 0
Now, this is also valid for the ast.Constant itself because of ast.Str, ast.Num etc. bases it. The bad side is, it makes (complex) sum classes unidentifiable.
----------
components: Library (Lib)
messages: 371797
nosy: BTaskaya, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: AST sum types is unidentifiable after ast.Constant became a base class
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41022>
_______________________________________
More information about the Python-bugs-list
mailing list