Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
> However, I'm very keen to learn what is an alternative solution then to > distinguish hard invalid from incomplete input. IOW, what would be the new > way of achieving what's described in the old FAQ? Unfortunately, there is no new way to do this from C due to how the new parser works. The only supported way is to manually import the codeop module from C (https://docs.python.org/3/library/codeop.html#module-codeop) and use its API as IDLE does, but this API can differ and will present its own complications, as unfortunately is implemented in a bit hacky way. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46502> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com