Earlier quoted context omitted.
Somebody has done just that already, it’s easily googleable. Nobody really cares though - why would you purposefully tie yourself to an objectively-inferior featureset, full of problems that have already been solved in py3? Because you can’t bear the use of parentheses for print, really?
> Because you can’t bear the use of parentheses for print, really? While I generally share your POV, it doesn’t do justice to the situation to trivialize the upgrade like that. Anyone with C based dependencies will have a rougher time (but not that “rough”) due to ABI changes. The harder userland change is string handling anyway (which isn’t that hard either), not parens on print.
Sunsetting Python 2
621–630 of 733 posts
Re: Sunsetting Python 2
#622Earlier quoted context omitted.
Right, but in engineering it's kind of expected to get support for a version for at least 60 years. Software engineering is just really weird in that it moves so fast and nobody seems to care to break things.
What free things are supported for 60 years in engineering applications? Name one.
Re: Sunsetting Python 2
#623Earlier quoted context omitted.
Anyone with a large python 2 codebase is going to want to stay behind if they could. People still run old FORTRAN from 20 years ago in production. I'm sure some old COBOL code is out there. The reality of not wanting to re-write working code is somewhat real.
This is such a good analogy, and really highlights the point that python 2 stalwarts look at organizations hiring for FORTRAN and COBOL today, and say to themselves, "Yes, this is the kind of organization I want to build." An organization that will either (most likely) be completely irrelevant in 10 years time or have to pay a massive premium salary for any engineer that can maintain their systems.
And people said what you said about it 10 years ago. And 20 years ago. And 30 years ago.
When those folks want to do scripting, they mostly use Python. And they mostly use Py3, from what I can see.
Re: Sunsetting Python 2
#624Earlier quoted context omitted.
Anyone with a large python 2 codebase is going to want to stay behind if they could. People still run old FORTRAN from 20 years ago in production. I'm sure some old COBOL code is out there. The reality of not wanting to re-write working code is somewhat real.
Are people routinely still purposefully writing new code in 20 year old versions of FORTRAN, or just maintaining existing stuff?
That's what I'm in right now :-)
Re: Sunsetting Python 2
#625Earlier quoted context omitted.
Quick: run a shell command, split up the reply by line, run a regex on each line, and save the results to a yaml file— now, does what you wrote work correctly on both Python 2.7 and Python 3.3+? Yeah that's what I thought. It's still hard to get bilingual Python correct today, and it was considerably harder before 3.3.
Okay, I did it. import subprocess import re import yaml output = subprocess.check_output(['ls', '-l'], universal_newlines=True) matching_lines = [] for line in output.splitlines(): if re.search(r'total', line): matching_lines.append(line) with open('matching_lines.yaml', 'w') as f: f.write(yaml.dump(matching_lines)) Python 3.7: https://repl.it/repls/PotableDamagedAutocad Python 2.7: https://repl.it/repls/OrchidDirtyN…
Re: Sunsetting Python 2
#626Earlier quoted context omitted.
I use Calibre as my primary e-book reader. I don't see many alternatives on Linux.
I basically use Calibre ebook viewer for its configurability and customization. If you want a good ebook reader, give Foliate ( https://github.com/johnfactotum/foliate ) a try. That and Bookworm ( https://github.com/babluboy/bookworm ) are the best standalone ebook readers I've seen in Linux.
Re: Sunsetting Python 2
#627My new Mac laptop in 2016 came installed with Python 2.7 from Apple. It's that kind of subtle defaults that I think slowed the transition. I didn't want to change the system Python.
https://developer.apple.com/documentation/macos_release_note...
Hopefully they will fix the shitty keyboard before that happens, so I can finally replace my old Macbook Pro.
Scripting Language Runtimes
Deprecations
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app. (49764202)
Use of Python 2.7 isn’t recommended as this version is included in macOS for compatibility with legacy software. Future versions of macOS won’t include Python 2.7.
Re: Sunsetting Python 2
#628Earlier quoted context omitted.
Out of curiosity, what is it that you like about Python 2? Not attacking you, just curious. I've never used Python professionally (mostly Ruby and Clojure), so I don't have a horse in this race.
I just realized I didn't answer your actual question, sorry. > what is it that you like about Python 2? I came from C and Pascal so from that POV Python is a rich and delicate syntactic and semantic gravy over the same basic functionality plus shell (Python was originally the shell language of the Amoeba distributed OS†). Things that might not seem that big a deal these days were a revelation to me when I started wit…
(Also, you're definitely not fucked with more than 100k LOC of Python, if the devs know what they're doing. Unit/regression/integration tests, type hinting, and a modular design goes a very long way)
Re: Sunsetting Python 2
#629Earlier quoted context omitted.
The Py3 string handling was beyond frustrating prior to 3.6. For what I do, Unicode complexity is not required. Having to stuff it into everything was more trouble than it was worth.
The ubiquity of emoji alone mean that Unicode is everyone's problem in 2010+, and ignoring it won't make it go away. It's Python 2.x where dealing with Unicode (which is everywhere) is far too complex, and more trouble than it is worth. The "complexity" of Python 3 string handling is worth it, and no worse (even < 3.6) than any other modern programming language, and possibly easier than some by making clear runtime e…
% python3.7 -c "import sys; print(sys.argv[1])" "$(echo -e '\xff')"
Traceback (most recent call last):
File "", line 1, in
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 0: surrogates not allowedRe: Sunsetting Python 2
#630Earlier quoted context omitted.
I heard several people saying that 3.6 was the first Py3 worth transitioning to. Largely for async (I think async/await came to live then). There is this take on performance: https://hackernoon.com/which-is-the-fastest-version-of-pytho...
Ordered dicts and f-strings are also very sweet!