STINNER Victor added the comment:

> We use this feature in pyflakes (https://github.com/PyCQA/pyflakes/issues/271)

AST is not designed to be 1-to-1 .py source to AST mapping. If you need the 
exact line number, you might use your own parser. I don't know what is using 
pylint for example? There is also https://github.com/PyCQA/redbaron which 
provides such 1-to-1 mapping but it has a different API than AST.

Sadly, I suggest to close this issue as WONTFIX.

----------

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

Reply via email to