News for hackers. Stuff that matters.
Re:Python 2.7 Countdown by kstrauser on Sunday January 07, 2018 @03:37PM (#16092551)
I think those are all improvements in Python3, even if they can be a hassle to fix:

1. Lots of legacy code incorrectly treats strings and byte arrays as the same thing. If you're dealing 100% with all ASCII all the time that might be mostly OK, but it's the wrong model for anything involving Unicode (which is pretty much everything now).

2. Modes are defined on Linux and macOS at least as uint32_t. -1 isn't a valid value of that type.

3. That bit me a few time. I've accepted that `def foo(a, b_and_c, d): b, c = b_and_c` is an alright substitute.

4. I like the new version better. `'a' > 5` doesn't even make sense and the 3.x way avoids accidental nonsensical comparisons.

There are no comments on this comment yet.