Hacker News new | past | comments | ask | show | jobs | submit login

I don't know that people don't choose C++ for performance reasons or for easy manipulation of low level stuff. Games, high performance computing, embedded and legacy software are the main applications of C++, aren't they?

Some people on this website seem to blow the python 2/3 transition fairly out of proporotions.. Python 3 is really extremely similar to Python 2, and there are great tools to convert Python 2 code to Python 3 and vice versa.




Is there a great tool to convert Python 3 to Python 2?

I've tried Pasteurize (part of python-future) but it just leaves the "yield from" statements in place, giving syntax errors. And 3to2 does even less, and seems to mostly be a framework for building tools like Pasteurize.

I know this isn't easy, but JavaScript people do it with ES6 transpilers, and ES6 is more different from ES5 than Python 3 is from Python 2.


The two libraries I've created both use a combination of 3to2 and pasteurize to convert the python 3 code to python 2. The only issues I've run into are new error types that I could not use. But there seem to be quite some issues open: https://bitbucket.org/amentajo/lib3to2/issues?status=new&sta...

In case you want to see the scripts I use to change the python3 code to python 2 and make it work with pip:

https://github.com/JelteF/PyLaTeX/blob/master/convert_to_py2...

https://github.com/JelteF/PyLaTeX/blob/master/setup.py




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: