kkanellis / uthportal-server

GNU General Public License v3.0
0 stars 1 forks source link

Python3 #1

Closed GeorgeTG closed 9 years ago

GeorgeTG commented 9 years ago

Maybe base the project on python3 ?

kkanellis commented 9 years ago

We should check if the used packages (like flask, gevent etc) are supporting Python3. And if they do what are the advantages of using it?

GeorgeTG commented 9 years ago

Cleaner syntax, easier ways of doing things, if i remember correctly some packages have newer versions that only support python3

kkanellis commented 9 years ago

Quoted from: https://wiki.python.org/moin/Python2orPython3

That said, well-written 2.x code can be a lot like 3.x code. That can mean many things, including using new-style classes, not using ancient deprecated arcane incantations of print, using lazy iterators where available, etc. A practical example: good 2.x code will typically use xrange instead of range; xrange was the starting point for the Python 3.x range implementation (although range is even better in Python 3, since it can handle values larger than sys.maxint). It should be noted that xrange() is not included in Python 3.

Above all, it is recommended that you focus on writing good code so that 2.x vs 3.x becomes less of an issue. That includes writing full unit test suites, and getting Unicode right. (Python 3.x is significantly less forgiving than 2.x about Unicode versus bytes issues: This is considered to be a good thing, though it makes porting some software packages fairly annoying.)

In addition gevent is not supported in Python3 and will not be anytime soon (you can check out the issue from github page of gevent).

GeorgeTG commented 9 years ago

Then focusing on better, cleaner code using ~2.7 python would be the answer