3 ms·
But... why? Python 3 has been "good enough" since 3.4. By 3.6, it was markedly better than 2. With the upcoming 3.8, it seems to be better in every way (includi
by kstrauser 7y ago
But... why? Python 3 has been "good enough" since 3.4. By 3.6, it was markedly better than 2. With the upcoming 3.8, it seems to be better in every way (including performance!).
I loved Python 2 for a long time. It was a beautiful language. But after seriously using 3, I would never go back. As in, I would turn down job offers involving Python 2 in any other context than "we're hiring you to help us upgrade".
- carapace 7y ago> By 3.6, it was markedly better than 2. Better how? Or better at what? It's likely that our opinions will be different but I've got an open mind and I'm genuinely curious about your experiences and opinion. (I hated PEP 572 at first but then some comment here on HN made me rethink and change my mind.)
- kstrauser 7y agof-strings. Enum. Dataclasses. asyncio. Type annotations as code. An explicit separation between bytes and strings. I love each of these and use them regularly. It's not that 2.7 is some abomination I can't stomach, but more that 3.[recent] is all of the things I appreciated about 2.7, plus a million little quality of life and performance enhancements that make it just that much more pleasant to use. I could live without each of those things individually, but would not be willing to give them all up.
- carapace 7y agoI can understand that (it sounds like me, talking about Python 2, eh?)
- minitech 7y agoFor me, it’s better at avoiding mistakes. The major one is separating bytestrings from strings, of course. Comparison operators not assigning a default order to different types (1 < "2" is now an error) is great. Division is more explicit. Explicit relative imports save me grief. Similar changes about providing APIs that are harder to misuse throughout the standard library.
- carapace 7y agoThat's a good point. There are certainly some warts in 2 that are fixed in 3. Cheers!
- a1369209993 7y agoHave they even managed to get print(b"byte = FF (\xFF)") working correctly yet? Never mind `print(len("ẅ"))`[0] and the like. 0: https://news.ycombinator.com/item?id=20246676 https://news.ycombinator.com/item?id=20246676
- Majestic121 7y agoWhat output do you expect from this ? If there is a bug, did you file a bug report it ?