New submission from Batuhan Taskaya <isidenti...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41022>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to