7 ms·
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 defau
by KaiserPro 11y ago
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.
Can someone enlighten me?
- mey 11y agoWhen 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)
- brettcannon 11y agoThe 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.
- mey 11y agoSo I assume everyone will migrate in 2021 or 2022.
- rjurney 11y agoI don't think people will migrate at all.
- rjurney 11y agoOpen 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.
- brettcannon 11y agoSure, 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.
- rjurney 11y agoThere IS a guarantee this will happen.
- Redoubts 11y agoWhenever Debian 7 and RHEL7 loose all support, at the minimum. Both shipped with 2.7 as the system interpreter.
- collinmanderson 11y agoJune 30, 2024 or longer for RHEL7. https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates https://access.redhat.com/support/policy/updates/errata#Life...
- sago 11y agoI am still aware of a Python 1.6 codebase in daily mission critical use. That's 'good enough' for them too. Is Python 2 worth the effort? Probably because of the ecosystem. And that will be when everyone transitions to Py3, when stuff they want to use is Py3 only.
- whitegrape 11y agoA 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. //rant
- sago 11y ago
- dalke 11y agoA lot of people still program in Fortran 77. There's no reason you can't be part of the equivalent population for Python.
- AlexeyBrin 11y ago> A lot of people still program in Fortran 77 That's because you can compile Fortran 77 with a modern Fortran compiler and link the old code into your new one without a lot of work. On the other hand I fail to see how you could use the Pyhton 3 interpreter with some old incompatible Pyhton library.
- dalke 11y agoWhile true, it shift the question to, why should a F77 programmer use a new Fortran compiler? Some answers are: it's faster, it runs on new OSes, it has better error messages. Those then become the same answers to the OP's question about shifting from Python 2.x to 3.x.
- AlexeyBrin 11y agoPersonally 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.
- dalke 11y agoI agree. I have a flawed comparison.
- dagw 11y agoA lot of people still program in Fortran 77 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.
- freyr 11y ago> 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.
- john2x 11y agoMy 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.
- netheril96 11y agoI 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.
- collinmanderson 11y agoI'm curious: what libraries still need porting? I feel like at this point most major libraries are either ported or have an easy fork/alternative.
- lmm 11y agoIf 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.
- plorkyeran 11y agoEven 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.
- lmm 11y agoMore 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.