Ask HN: What would it take for you to switch to Python 3?
9 points| rectangletangle | 12 years ago | reply
The other common complaints seem to be against the GIL. Which from what I've gathered, there doesn't seem to be any adequate solution for yet.
Python 3.4 comes with an intriguing new asyncio library, as well as new enumeration and statistics libraries. These seem like they may be tempting enough to coerce some users into making the switch.
Ubuntu 14.04 LTS is supposedly shipping with Python 3 as the default version. I personally think this is what it will take to garner wide spread adoption.
So, what will it take for you to make the switch?
[+] [-] dded|12 years ago|reply
1. Lack of library support (as you indicated). I'll confess to not paying careful enough attention to know what specific libraries are desired.
2. Lack of a big enough carrot. I think this is what you mean when you mention the GIL. After all, Python2 also has the GIL, so its presence in Python3 is not a reason not to upgrade; but its absence might be a big enough motivation for some people to upgrade. Other wanted features that I recall include JIT compilation and tail call optimization; but I probably didn't pay enough attention to specifics here, either.
3. A claim that Python3 is inferior for interactive use. One complaint is that print is no longer a statement, but I can't help but wonder if some people don't realize that if a variable or expression is entered in the REPL it is automatically printed (the P in REPL). The prevalence of iterators over lists is also cited in this space.
4. Byte strings don't work well for those who need them. The Mercurial folks had something interesting to say about this, but others had complaints too. Sometimes little things don't work: one poster mentioned that byte strings can't be used as a key to a shelve object, element selection can't be combined with concatenation, etc.
5. The mismatch between Unicode strings in Python3 and C strings in Unix-like operating systems. This one is the one I care about and is thus the direct answer to your question.
6. What I might call petty complaints, but won't lest people call my complaints petty: lack of print statement (I don't get it, but it was very popular), true division, etc.
[+] [-] rectangletangle|12 years ago|reply
[+] [-] iposbeforehoes|12 years ago|reply
Seriously. I've programmed for 5 years, studied CS, and I really don't understand how to do it.
I have a Mac Book Pro Retina, so it ships with 2.7. I write Ruby in various versions via RVM, and I have no idea what version of Node I use, but I use it a lot.
Over the Holiday I decided to try to port some Node services to Python (mainly because they are analytics projects and I'd like to start using Python for analytics and "data science" ). And I struck out. Bad. Using Homebrew to install Python 3[.3] and no success with virtualenv and Pip. At best I get a pip-3.3 to install and crash anytime I try to install a package.
I would love to convert these services to Python 3. In fact, I'll regret not doing so. But at this point, it really isn't worth my time trying to figure it out. Once I accepted installing my packages via 2.7, I was able to convert the services (with tests!) over a long weekend.
I did a fair amount of research through Google and Stack Overflow, and each confirmed my suspicion that this process is shit.
I just saw a tweet by @holman where he described a friend saying 'how can ruby be such an easy language but be so hard to install?' And asserted that our industry still sucks (and in my opinion Ruby in any incarnation is infinitely easier than Python).
He is so right.
[+] [-] rectangletangle|12 years ago|reply
[+] [-] ribbit_flower|12 years ago|reply
[+] [-] treeform|12 years ago|reply
1. 64 bit psyco (http://psyco.sourceforge.net/) OR another JIT compiler that is just as good. Maybe Cython like optional typing support.
2. Greenlet like networking in core that we don't have to dance around. Maybe asyncio does it.
3. Tons of people proclaiming how much better py3 is. Frankly it might be there I just don't know. We need peer pressure.
[+] [-] trothamel|12 years ago|reply
A problem is that time I spend porting to Python 3 is time I don't spend adding features to my application. I'm probably going to bite the bullet this year and port. But it's likely to cause problems (just because I'm modifying debugged code), without providing a lot of benefit to the people who use my code.
[+] [-] ribbit_flower|12 years ago|reply
1. Documented and significant performance improvements. 2. A really good guide to how the hell strings work in Python 3, I still don't really understand how to go between unicode/bytes, etc.
[+] [-] jbeja|12 years ago|reply
[+] [-] Rhapso|12 years ago|reply
[+] [-] davvid|12 years ago|reply
[+] [-] jardaroh|12 years ago|reply
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] pockethook|12 years ago|reply