Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
> SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, > global, True, __new_parser__, if, raise, continue, not, break, while, None, > del, nonlocal, import, assert, return, class, with, def, try, from, yield Haha, that is a good point. It also reveals the easter egg :) > The beauty of Python's detail-free syntax error is that it doesn't tell you > what it expects -- because parsers are dumb, what the parser expected is > rarely what's wrong with your code -- and it requires the user to understand > how the parser works to interpret the error message. Right, I think will be very difficult to actually give you something very close to what the actual problem is. I started this draft based on some similar errors that I have seen in other parsers but is true that with the exception of rust, all other grammars I explored and played with were mucn simpler, so the errors were not super verbose. I think i will close the issue and the PR unless you think there is something worth exploring/discussing left, as it does not look that we can get something less verbose in an easy way. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40599> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com