3 ms·
It is not though. Python 3 is wayyyy easier to teach. And i should know since it's my job.
by sametmax 9y ago
It is not though. Python 3 is wayyyy easier to teach. And i should know since it's my job.
- mbreese 9y agoGot a couple of quick examples where Python 3 is easier? Is it that it is more consistent in places?
- devy 9y agoUnicode handling. Python2's implementation on that is broken.
- mynewtb 9y agoString handling that makes sense No more long type Division that works as expected Annotations No more xrange, iteritems etc, instead you get iterators everywhere f-strings
- squeaky-clean 9y agoI think my personal favorite is exception chaining. Makes it so much easier to debug issues, especially for newbies.
- gdwatson 9y agoI'm a Python 3 fan, but I didn't expect that. Could you explain why?
- sametmax 9y agoIt's the aggregate of so many little things. Less duplicates (xrange vs range, itemview/iteritems/items(), map/itertols.map,). Entering french in comments will not crash the program even if you didn't give "the unicode talk". Clear type for raw bytes with a proper name. Way less verbose (no __future__, no u, no object, no codecs import, f-strings, simple super(), etc) Debugging is easier (debug messages are better, exception chaining, division makes sense, repr is clearer) You can't shoot yourself in the foot as much (ordering "1" and 1, assigning to True ...) Less stuff to learn (e.g: pathlib instead of os/shutils/glob/codecs) And that's just out of my head.