3 ms·
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 t
by anon3_ 11y 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+or+_compat.py https://www.google.com/search?q=site%3Agithub.com+compat.py+...
- https://github.com/search?utf8=✓&q=extension%3Apy+"if+PY2"&type=Code https://github.com/search?utf8=✓&q=extension%3Apy+"if+PY2"&t...
[1]: http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/ http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/