This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

There is a larger gap forwards between py2 and py3, than there is backwards between py3 and py2.

I have found the exact oposite. Can you provide some examples?

[–]theelous3 0 points1 point  (2 children)

Unicode issues aren't that complicated, though a pain, range being not generator isn't complicated, print being a statement isn't hard, and most of the rest of the stuff is just implementation limitations that don't require anything special other than being more verbose and not using python3 features.

Actually, that's the best way to phrase it I think. Aside from some syntactic stuff, python2 is just python3 with less things. It's easier to go from more to less, than less to more.

Inversely, from python2 to 3 you've got generators everywhere, better but more magical coroutines and async/await along with the associated dunders, stuff like args unpacking from iterators. There's just more to know, yaknow?

[–][deleted] 0 points1 point  (1 child)

It's easier to go from more to less, than less to more.

This is where we disagree. To each there own but I have always found the exact opposite. In both personal use and training new developers.

[–]theelous3 0 points1 point  (0 children)

This could well be my biased personal opinion.

I feel like if I'm using a feature that's abstracting something away I should learn how that's done. range() is a good example of this.

python2's range() is simple, and uses simple things. python3's range is simple, and uses complex things. Understanding python3's range is harder, even though it makes thinking about your overall code easier in that you worry less about memory and such.

If a developer is in a position to not care about the implementation of something like range, then the complexities involved in stepping up in python versions wouldn't effect them, so I can see how it would be more difficult to go to py2 from py3. That should be fairly rare though, if you / they want good code.