cosmid icon indicating copy to clipboard operation
cosmid copied to clipboard

Python3 compatability

Open robinandeer opened this issue 11 years ago • 4 comments

robinandeer avatar Jan 10 '14 15:01 robinandeer

2to3 seems to work right off the bat (not introducing weird changes at least) Read up more on that project

robinandeer avatar Jan 17 '14 15:01 robinandeer

Looking at your code you should be able to use some from six.moves import ... strategically after your 2to3 conversion to provide back-compatibility for py2.6 and 2.7.

mdshw5 avatar Feb 20 '14 15:02 mdshw5

Great! That package was new to me. I knew about from __future__ ... but would rather like to develop in Python 3.x directly which I suppose "six" enables.

robinandeer avatar Feb 20 '14 15:02 robinandeer

Yes, that's the idea. It's good to have some unit tests that you can run and then use something like tox to run your tests under versions of py2 and py3.

mdshw5 avatar Feb 20 '14 15:02 mdshw5