Hacker News new | ask | show | jobs
by anon3_ 4061 days ago
If you're wondering how you can do above / why it's not such a big deal: Python 2.7 has everything you need to write forward compatible code. It gives you all the __future__ dunders, the only extra thing you need is a compat module [1]:

See kaleidoscope of examples:

- https://www.google.com/search?q=site%3Agithub.com+compat.py+...

- https://github.com/search?utf8=✓&q=extension%3Apy+"if+PY2"&t...

[1]: http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/