Batuhan Taskaya <isidenti...@gmail.com> added the comment:

I don't see the point of augmenting the ast.parse, since we already have 
variants of proper CST implementations outside the core python. Such as 
github.com/davidhalter/parso/ or LibCST. 

Also for basic refactorings, it is so easy to use tokens for the refactoring 
and AST for the analysis! Even the ast.unparse() can be partially used (like 
first finding the related segment of the code through AST analysis, building 
the corresponding variant, unparsing it, finding the region of related tokens 
in the source code and replacing them). There are also quite a few libraries 
for using tokenize in different purposes (or wrappers) such as 
https://github.com/asottile/tokenize-rt or github.com/isidentical/brm.

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

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to