Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
> because my requirement is to detect if a code can be incomplete Python code, > without ever compiling it. AS I mentioned in other issues, unfortunately the new parser doesn't allow to do this as the old one does, because how it works. The codeop module hacks around this by comparing the error messages if you add new lines, which is know to be fragile and quite bug-friendly. So I am afraid there is not going to be a reliable and supported way to do this with the new parser. You may need to use a 3rd party library that allows parsing incomplete code. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com