Fixing What 2to3 Can’t
We'll cover the following
- False is invalid syntax
- No module named constants
- Name ‘file’ is not defined
- Can’t use a string pattern on a bytes-like object
- Can't convert 'bytes' object to str implicitly
- Unsupported operand type(s) for +: 'int' and 'bytes'
- ord() expected string of length 1, but int found
- Unorderable types: int() >= str()
- Global name 'reduce' is not defined
False is invalid syntax
You do have tests, right?
Now for the real test: running the test harness against the test suite. Since the test suite is designed to cover all the possible code paths, it’s a good way to test our ported code to make sure there aren’t any bugs lurking anywhere.
Get hands-on with 1400+ tech skills courses.