I decided it was finally time to move to Python 3 from Python 2. Having done so, I don't see why I wasn't using Python 3 years ago, although my code worked just fine so it wasn't really a big deal.
Python 3 has two big advantages, and there's also a third reason you should be using it by now.
- Unicode: You don't have to worry about catching Unicode characters in string types anymore, Python 3 does it for you. This is a concern for me with web scraping. So much easier.
- For years I've read about the following dilemma in OSX, with no solution:
- If you DON'T install your own copy of Python 2, you are modifying the OS's copy of important libraries and such, and that can cause problems.
- If you DO install your own copy of Python 2, you then have two versions of Python 2 on your computer, and that can cause problems.
- But, the best part was that about 99% of my code still works as is. All I've had to do so far is change print statements, from
print "Print this Py2!"
toprint("Print this Py3!")
, and get rid of the Unicode error catching.