Update Python builtin keywords, functions, and exceptions to Python version 3
Python2 is EOL for a while now, see https://www.python.org/doc/sunset-python-2/. Thus, update the builtin keywords, function, and exceptions as how they are used by Python 3.
See: - https://docs.python.org/3/reference/lexical_analysis.html#keywords - https://docs.python.org/3/library/functions.html - https://docs.python.org/3/library/exceptions.html#exception-hierarchy
@joclement Thank you for your contribution. Even though Python 2 is EOL, we still have users on the old version, plus we do not have a way to specify v2 and v3 like Pygments. For that reason, I would suggest avoid removing old keywords. What do you think?
We don't interpret or run code, we only highlight it. Despite Python 2 being EOL, it is still reasonable to, e.g. write a blog post about it. I think there may be some merit into splitting these if they diverge too much, into e.g. a python and a python2 lexer, but if we can have one lexer that can highlight both, I don't see an issue with it.
Thank you for the feedback and sorry for not addressing this earlier.
I reverted the changes dropping Python2 support.
Using git log -p -w --word-diff shows much better than the diff on GitHub that I just re-added keywords and broke too long lines.
Thanks @joclement. LGTM 🚀