3 ms·
But it is not old code that is somehow stuck with Python 2. Lots of new code is written with Python 2 every day. It wouldn't surprise me if there were more line
by xorcist 12y ago
But it is not old code that is somehow stuck with Python 2. Lots of new code is written with Python 2 every day. It wouldn't surprise me if there were more lines of Python 2 than Python 3 produced today.
With many important code bases such as Ansible and Django you still need to keep a Python 2 around. (Yes, I know Django works on 3, but less people use it and performance is slightly lower.) So you are dual stacked for the forseeable future if you choose the Python 3 route.
So the Python ecosystem is a little more complicated than "old" Python 2 code versus "new" Python 3 code. Should I put my consultant hat on I would still advise people to start new developments with Python 2, but to keep an eye out for future compatibility issues. That recommendation hasn't changed in five years.
- mherrmann 12y agoYou're probably right that more lines of Python 2 are written today than are Python 3. But I bet it's like that for virtually every latest version of a programming language today. Python 2 will be kept around until 2020. Obviously there will still be companies using it after that date. But they have been given ample notice. I use Django with Python 3 and it's great. Admittedly, I don't need a lot of performance though. I really like Python 3 mainly for its more explicit treatment of Unicode. I believe the only way for Python to remain a success is if the community adopts Python 3 and puts in the effort to migrate away from 2. Once the community is there, organizations will follow.