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.
===
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.