Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: We should do something about Python, but what exactly?
7 points by watermel0n on Feb 19, 2014 | hide | past | favorite | 9 comments
Following my tweet: https://twitter.com/vince_prignano/status/436022056967479296

I love Python. I love the Python Community, but there is a problem and you know its name: 3.

I was on a train the other day directed to my University, I was reading a book about Algorithms and Data Structure. I met this guy that was in his first year and asked me what programming language he should learn next: Python. I introduced Python to him, how to get started etc.

One thing I did not say: use Python 2.7. It really didn't came up in my mind, it's natural to me when talking of Python referring to 2.7; it's like Python 3 does not exists.

This problem is not newm Alex Gaynor posted about it in December (http://alexgaynor.net/2013/dec/30/about-python-3/) and nothing was done.

It's going to be a mess.

So I am asking, what can we REALLY do to save Python?



I tried Python 3 recently. I honestly can't see that much difference. I had to alter print statements to print functions, and change "Exception , e" to "Exception as e". To be honest I couldn't see what the fuss was about.

Now, the real problem was libraries. 90% of the libraries I wanted to use had been ported to Python3 , but there were two or three that hadn't. That basically put me back to Python 2.7. (From a comment on here apparently one of the said libraries now has been converted).

So I guess if you wanted to be proactive you could look at some popular libraries that haven't been ported to Python 3 and start writing.


I look at it this way, too. The brutal approach has been chosen, we can argue about it's effectiveness or individual choices, but the only way we could make it worse would be to start all over again, this long in the game.

There is nothing special about legacy software not functional under the most recent version. Ask the java folks in big enterprises. I highly prefer this approach with a strong focus on a clean API than the other way around.

We should stop arguing about wrong choices and start start losing graciously [0] and fix the missing pieces.

[0] http://www.markshuttleworth.com/archives/1316


Absolutely this - lose gracefully and start helping fix the remaining problems


I don't really get what your on about here. You are talking about loving python and that python 3 is a problem without actually listing what your problems are with it (have you used python 3.3 (its good)).

Is it that adoption is slow? Lets take PHP for example they have exactly the same problem PHP 5.3 is still massively used though 5.5 is out.

I am a python developer (currently using 2.7 but we are in the process of refactoring ready to port to python3). I have started porting personal projects as well.

The main reason python3 uptake has been slow is two main reasons. Existing projects are python 2 and until recently the default versions on operating systems have been python 2.7.

A large number of open source projects are more than happy to run on python 3 and 2.7.

So my question to you is what is really the issue you have with python 3?

So to answer you last question what can be done to save python?

Nothing it doesn't need saving it needs education and a community who don't go around python 3 == bad; because its really not.

People need to take a look at there projects and simply port them so they are python3 compatible.


Add back the features that were removed with Python 3 (mostly the print statement, maybe some library features?). Then let the user choose what str and unicode mean. Either via command-line flag, modeline for the file (similar to "#coding: utf8"), or via something like:

    bytes = strings.bytestr
    str = strings.unicode
Why? Not because I miss the print statement much. The goal is that 95% of 2.x legacy code will now work with the new Python 3.x+. (I'd call it Python 5 because 2+3=5.)


We don't need another bridge between Python 2 and Python 3. That's Python 2.7's raison d'etre.


No, not a bridge. Add back the removed features to mainline python.

I want to just install the latest interpreter from python.com or my OS repositories like I used to, and run all the scripts I created at work over the years. Right now I have to switch between multiple python versions for different programs, and I can't combine their code, because some of it requires a certain version.


What's preventing me moving to python 3 is that I'm using Flask, and it makes it pretty clear that you probably shouldn't be running Python 3 unless you have some special reason.


your post actually made me think about it. I have been ignoring python 3 for years now, doing like it doesn't even exist.

So yesterday I finally installed it, and ran my latest pet project with it. Turns out, I still feel like home, the change is not THAT different.

And I will keep going with Python 3 whenever I can.

The really annoying part is for already existing stuff. I will have to know which script to run with which version of Python . . .




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

Search: