erikrose / parsimonious

The fastest pure-Python PEG parser I can muster
MIT License
1.81k stars 127 forks source link

Modernize Syntax for python 3 #206

Closed lucaswiman closed 2 years ago

lucaswiman commented 2 years ago

This PR removes some superfluous syntax that is no longer needed in python 3:

The former are literally no-ops in that the exact same bytecode is produced now with or without u-annotation on a string. The latter is usually equivalent, though not always. There is one case in this codebase which is not equivalent and I left it as-is.

lucaswiman commented 2 years ago

Other modernizations to consider: