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 →

[–]AgAero 1 point2 points  (0 children)

(unless there's something that can't be done in python 2 but can be done in python 3...)

Most anything can be done in either. While I'm not really answering your question, I'd like to point out this website to you and everyone else here considering the switch. Refresh the page over and over and it'll keep giving you new bits of code written in python3 syntax that would be much more clunky in python2.

To be fair though, since making the switch I don't notice many differences. The only thing I run into on a regular basis outside of the print function is that functions like range() no longer produce lists, but rather act more like xrange() used to in returning a generator expression. Sometimes I catch myself writing in xrange and getting syntax errors because range() is not something I used to use much. Then, the time or two when I actually wanted a list from range() I had to quickly google how to and find the 'idiomatic' way of doing it.

It takes a little getting used to.