Hacker News new | past | comments | ask | show | jobs | submit login

> 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.)




f-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.


I can understand that (it sounds like me, talking about Python 2, eh?)


For 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.


That's a good point. There are certainly some warts in 2 that are fixed in 3. Cheers!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: