News for hackers. Stuff that matters.
Re:NumPy 1.16 is the last release to support Python 2.7 by anonymousCar on Sunday January 20, 2019 @09:55PM (#18957273)
When can we start calling Python 2.7 legacy code?
Re:NumPy 1.16 is the last release to support Python 2.7 by ggm on Sunday January 20, 2019 @10:40PM (#18957461)
Now.

seriously. I think we have to treat it as legacy code now.

Re:NumPy 1.16 is the last release to support Python 2.7 by mr_toad on Sunday January 20, 2019 @10:51PM (#18957508)
2009.

Seriously, it’s been 10 years since Python 3 came out, Python 2.x has been supporting legacy code since then.

Re:NumPy 1.16 is the last release to support Python 2.7 by dralley on Sunday January 20, 2019 @11:57PM (#18957747)
Python 3.3 was the first version >3 that was actually "good". Prior versions were, if not unusable, not a great experience. Even when writing new code. And some of the Python core devs (Raymond Hettinger) share that opinion.

And let's not understate what a big deal it was to break compatibility like that. Porting a sufficiently complex project is non-trivial.

Re:NumPy 1.16 is the last release to support Python 2.7 by SlowRobotAhead on Monday January 21, 2019 @01:54AM (#18958247)
Biggest failure of the Python group is definitely the 2.7 / 3.x nonsense. It annoys me greatly when I see new code on 2.7, thanks a lot Nordic.
Re:NumPy 1.16 is the last release to support Python 2.7 by ac130kz on Sunday January 20, 2019 @11:19PM (#18957598)
This is the only way how Python2 should be treated.
Re:NumPy 1.16 is the last release to support Python 2.7 by gnulinux on Sunday January 20, 2019 @10:50PM (#18957501)
EDIT: My comment is grossly misunderstood and I cannot delete my comment. I did not imply python 3 causes bad code, I was trying to tell a story about how "our" python 2 code is handsome and python 3 code is ugly; sorta implying python2 is not necessarily legacy code. I have absolutely no problem with python 3 and prefer it over python 2. I do not want to start a 2 vs 3 flamewar please just ignore this comment.

===

My company has >1 million line of python 2.7. About 1.5 year ago we managed to pass our test harness (about 80% line coverage) in python 3. At the moment we can't do that but we believe if we tried hard for a few weeks we can do it again too. I don't know how we define "legacy code" but I code in this codebase everyday and the code is actually very pretty and understandable. We also have a python 3 project (only a few thousand line of code) and god that code is definitely ugly as shit. Even after python2 goes unmaintained, I will still think our python3 code looks more like legacy.

Re:NumPy 1.16 is the last release to support Python 2.7 by gh02t on Sunday January 20, 2019 @11:51PM (#18957720)
Plenty of old code is beautiful. "Legacy" code is code that relies on technologies that are no longer supported. That's not to say I don't sympathize and I know that the transition is not trivial in a large codebase, but when it comes down to it yes, it's probably necessary to start thinking of Python 2 code as legacy.
Re:NumPy 1.16 is the last release to support Python 2.7 by nas on Sunday January 20, 2019 @10:54PM (#18957520)
If your Python 2 code is clean and your Python 3 is ugly, I don't know what the hell you are doing. They are almost the same language. Are you trolling?
Re:NumPy 1.16 is the last release to support Python 2.7 by S4M on Sunday January 20, 2019 @11:20PM (#18957607)
Probably the Python 3 code was rushed and/or written by an inexperienced programmer. That would just be a coincidence, nothing to do with Python 2 or 3.
Re:NumPy 1.16 is the last release to support Python 2.7 by ovi256 on Monday January 21, 2019 @03:19AM (#18958682)
The narcissism of small differences: it makes us notice differences (and dislike the differences) between things that are mostly identical to outside observers.
Re:NumPy 1.16 is the last release to support Python 2.7 by pacala on Sunday January 20, 2019 @10:56PM (#18957526)
> that [python3] code is definitely ugly as shit

Can you please give some examples? I've recently picked up Python 3, wondering what well known traps I should avoid.

Re:NumPy 1.16 is the last release to support Python 2.7 by gnulinux on Sunday January 20, 2019 @11:30PM (#18957645)
No I did not mean python 3 is what makes the code ugly. I just said the code is ugly and it happened to be python 3. As an answer to your question, just stick to pythonic principles and you'll be good.
Re:NumPy 1.16 is the last release to support Python 2.7 by ac130kz on Sunday January 20, 2019 @11:17PM (#18957593)
Python3 was cleaned up pretty well, however it's up to devs whether to use the latest cryptic features no one understands.