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

> There is so much innovation in 3.x, I could write for an hour and not list everything.

Could you give one big example? It all seems like nice to haves to me.




Probably my favorite single thing, which is really a collection of things, is that Python 3 makes many classes of previously obscure bugs more immediate and obvious. hasattr() no longer masks exceptions; object comparisons without ordering methods defined will raise a TypeError, instead of being based on object ID (which is a race condition); two exceptions raised in succession will give you two stack traces, instead of just the last one. These and similar changes make bugs more likely to be found and fixed quickly, during development, instead of lurking until they're deployed. More info here: http://migrateup.com/main-difference-python-3/

That said, it depends on what you mean by "innovation". To me the above is a worthwhile improvement, and more important than (say) asyncio. It's also a "nice to have", in the exact same sense that 2.7's features are a nice-to-have compared to what's in 2.5. At the end of the day, if you want to continue coding in 2.7, that's what you should do.


Small improvements. Don't get me wrong: the things you listed are all nice and useful (+1 for keeping more than one stack trace). But I don't think anyone's definitions of "innovation" includes fixing exception reporting and changing the semantics of object comparisons. No disrespect intended but your earlier statement was clearly meant to convey what a boatload of innovation there was in Python3, and your response to the request for an example just bolsters the counter claim, frankly.


and that couldn't be added to python 2?


Not without breaking backwards compatibility. Although I guess they could have done a slower transition, with 2.8 giving depreciated warnings by default (with a flag to make them errors), 2.9 giving errors by default (with a flag to make them warnings) and 2.10 finally breaking backwards compatibility.


It WAS. That's why they bumped the version number.


I tried to outline a bunch of things at http://www.snarky.ca/how-to-pitch-python-3-to-management . But what one person considers an "innovation" while another considers just something "nice to have" is going to vary from person to person, problem to problem.





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

Search: