Live data from Hacker News

Converting Python2 to Python3 [video]

neckbeardrepublic.com

1–2 of 2 posts

Re: Converting Python2 to Python3 [video]

#2
I have recently started writing small stand-alone scripts/apps in Python3. It's been a pretty interesting experience. Aside from certain frameworks not supporting Python3, it's been pretty easy. The biggest problem for having code that I want to run on Python 2 and 3 has been unicode vs str literals until I discovered

  # encoding: utf-8
  from __future__ import unicode_literals
After that the only code that explicitly does something different is a library I have (https://github.com/ipartola/groper) which cares explicitly about int vs long.