meh, there isn't (still) any reason to really jump onboard python 3, 2.7 is good enough for me
the only real selling point is that strings are unicode by default. Unless I'm missing something python 3 just doesn't really seem to be worth the effort, yet.
Very few people still program in 77 and only if they really have to. Everybody who has a choice has moved on to at least Fortran 90 and you won't find anybody seriously arguing that Fortran 90 isn't a massive improvement over 77.
They weren't saying that in 1993. At least, not as I recall from the time. It took a while for that consensus to build.
I believe that many of not most Python 3.5 users consider it a massive improvement over Python 2.7. My examples come from the core developers, so is highly suspect to bias.
I recently decided to make an effort and use python 3.5 for a couple of new projects and I've so far found zero things that I consider a practical improvement over doing the same thing in 2.7. Now it's obviously not worse than 2.7, but saying that the new thing is just not worse than the old thing is hardly a great selling point.
Language level async will probably be a reason to switch once there is a bit more support for it and I have a project that really needs it. Same with type hinting, once the tools and libraries are there it might be useful. But as of today and the work I do (mainly data analysis and modelling making heavy use of numpy/scipy and friends) I have yet to find anything in 3.5 that in itself would be a reason for me to switch.
Personally I quite like Pyhton 3, but the original comparison was flawed simply because with Fortran 77 you can just take your 30-40 years code recompile it with a new compiler and in 99% of cases will work.
While with Pyhton 2 to Python 3 there is usually a non trivial amount of work you need to put into migrating an old codebase.
> meh, there isn't (still) any reason to really jump onboard python 3, 2.7 is good enough for me
You're siding with a shrinking ecosystem (Python 2) over a growing ecosystem. Depending on your use case, this could range from inconsequential to inconvenient to disastrous.
If you have an existing codebase in Python 2, then perhaps the conversion to 3 isn't worth the effort. But if you're developing new software, the question is why not make the minimal investment to make your work compatible with the future of the language? When I see a new library and the author couldn't be bothered to adopt Python 3, it's a big red flag.
My main concern that's stopping me from using Python 3 for all new projects is the risk of being in the middle of the project, and finding yourself needing a library only to find out that it only works on Python 2.
Couple that with 2.7 being good enough just makes the situation "worse" for 3.
I was a staunch Python 3 supporter until I encountered such a thing. I avoid Python 3 now because I don't want to be forced to make a decision between writing the requisite library myself (a huge undertaking), abandoning the project entirely, or rewriting everything into Python 2 again. Better to just start with Python 2 in the first place.
If you're using any language other than C you'll always occasionally find yourself in the situation of "there's this useful library that only exists in C". But for many languages the library ecosystem is large enough, and the language better by C than enough, for the tradeoff to be worth it.
Also that's kind of what this post is about. Pretty soon there'll be a bigger risk of finding that some library you want is Python3-only than finding that some library you want is Python2-only.
Even when writing C you still occasionally find yourself in the situation of "there's this useful library that only exists in Java". There's no language that can directly use every single specialized niche library written by a domain expert.
A head-to-head comparison of 1.6 against 2.7 and 2.7 against 3.5 will quickly make it clear it's not the same thing. Python 2.7 is not only "good enough" by itself, there's also no compelling reason to move to 3. Bad incentives from both directions. I wouldn't necessarily say Py3 is inferior as the author wondered, it's just insufficiently superior, and not having Library X available for years is just an additional thorn in the side of people attracted to Python in the first place for the ability to get stuff done that's still readable years later. Py3 really just doesn't offer anything killer for tons of programmers. Things that would have appealed to me: massive performance increases, or a worthwhile standard library improvement, or an impressive syntax upgrade, and only by migrating can you get those nice things... Some other people get hot for static typing too, so I guess they might finally be happy.
This always bugged me about Python:
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
You know god damn well what I mean Python, so just do it instead of nitpicking me. Python 3 doesn't fix this, and makes it worse. Case in point (using a web repl as I'm not at a computer with Py3 on it at the moment):
>>> range 4
Traceback (most recent call last):
File "python", line 1
range 4
^
SyntaxError: unexpected EOF while parsing
Okay, reasonable enough...
>>> print 4
Traceback (most recent call last):
File "python", line 1
print 4
^
SyntaxError: Missing parentheses in call to 'print'
You know god damn well what I mean, Python. You know what you could have done to have your precious sys.stdout.write(repr(arg) + "\n"[, extras]) as a smaller replaceable built-in function that wouldn't break everyone and make them sad? Called it Echo. Puts. Print3. Println. Nope, just breaking the most basic things, for no real good reason since it's not like Python is going the Lisp route of killing the distinction between statement/expression in favor of everything being an expression.
> You know god damn well what I mean Python, so just do it instead of nitpicking me
Python has no idea that's what you mean.
>>> repr(exit)
'Use exit() or Ctrl-D (i.e. EOF) to exit'
It's just the exit function has a __repr__ that returns that. Why the hell would Python make just 'exit' exit the interpreter? That's unlike anything else in the language.
>>> print 4
SyntaxError: Missing parentheses in call to 'print'
This is a special case to help with the transition from 'print' to 'print()'. Should 'i 1' have a message saying a parenthesis is missing? I could mean 'i + 1', or 'i, 1'.
Honestly after using Scala for 3 or 4 years I couldn't go back to a language that doesn't allow an "object method argument" style of doing method calls. Superficial perhaps, but it can make code so much more readable.
Sorry I hit a nerve. You insisted it 'wasn't the same' but didn't give an example.
If you don't need what Py2 provides, I don't know why it wouldn't be 'good enough'. And since I built a lot of complex stuff in Py1, I can't imagine why anyone would think it is not good enough for building complex stuff.
When I moved to Py3, it was the thing that got me most often. It was annoying. But three things changed to make that less annoying:
1. I got used to it, fairly quickly. That made me care less.
2. I used print-statement debugging less, and unit tests more. This was a good thing generally.
3. For those times when I did need print to debug, I found I could drop in pprint:
import pprint
print = pprint.pprint
which is very useful. That won me over.
I've rarely needed naked print to do anything but quick testing and debugging (because by the time I have a command line script, I want at least to have a -q option, so I need to run output through some kind of proxy function). The standard arguments for print() (i.e. composability, extra arguments), I've not needed, but the ability to replace it, I rely on totally now.
python prompt isn't much of a development shell, use ipython
it lets you type exit and if you turn on autocall (%autocall) it lets you run functions without parens(hint this isn't valid python).
print isn't a statement in python 3 and range was never a statement
More consistent division and integer/long handling, but yeah it's minor except for the strings/bytes thing. The thing is the only "effort" is in fixing strings/bytes issues - but the cases where you have those issues are precisely the cases where what python 3 does is so important! If you're not doing any string/bytes stuff then upgrading to python 3 is a triviality. If you are writing code that mixes strings and bytes then you need to clarify what you're doing (if you want your code to ever be maintainable), and python 3 will give you a great deal of help with that.
When will support stop for Python 2.7? Once it stops being patched/supported, it represents a security risk (in my book).
Additionally, eventually new libraries will also stop supporting 2.7, with the same issues as well as making development harder (or not as easy as your peers/competitors)
The Python development team will cease supporting Python 2.7 in 2020. After that you will have to buy support from someone like Red Hat or Continuum Analytics.
Open source support is not a centrally governed entity. FOSS support for Python 2.7 will continue after 2020. You will certainly still have the option of paying someone for support.
Sure, there's a chance people will pick up the mantle and essentially fork Python 2.7 to do unofficial bugfix releases past 2020; as you pointed out, it's open source and people can do what they want. But my point is there is no guarantee that will happen, nor that those unofficial releases will be of quality either. RH and Continuum on the other hand will most likely have financial incentives to make sure any maintenance they do meets the needs of their paying customers and thus are of a certain level of quality. IOW one possible future is more of a certain than the other.
the only real selling point is that strings are unicode by default. Unless I'm missing something python 3 just doesn't really seem to be worth the effort, yet.
Can someone enlighten me?