Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Converting Python2 to Python3 [video] (neckbeardrepublic.com)
30 points by sshamte on March 26, 2013 | hide | past | favorite | 1 comment


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: