Live data from Hacker News

Python 3: Ten years later

archive.fosdem.org

71–80 of 93 posts

Re: Python 3: Ten years later

#71
post #63

Please don't rewrite titles, especially to make them more baity. This is in the site guidelines: "Please use the original title, unless it is misleading or linkbait; don't editorialize." Titles are by far the strongest influence on discussion, so this rule is much more important than it seems. https://news.ycombinator.com/newsguidelines.html (Submitted title was "Python 3 Is Now 10 Years Old Was It Worth It?".)

In the submission form, have the title field auto populated from the URL.

Would take about 5 minutes to integrate this... certainly less than it takes to deal with people coming up with their own titles, sometimes without a malicious intent, they just don't know the rules.

https://embed.ly/extract

Re: Python 3: Ten years later

#72

Python almost became my main language, but I moved to another language when I saw it was stuck at 2.7. Another reason was the lambda's only allowing 1 line instead of the flexible closures in so many other languages. And my expectations for future improvements were very low as the core maintainer looked quite stubborn to me.

Pretty much how I ended up doing most of my coding in Groovy. I essentially wanted Python. But Python wasn't a good enough Python. (being honest, other things attracted me to Groovy as well - Java ecosystem etc, but it's interesting to me that in the larger picture, I'm sort of using Groovy as a proxy for a Python without Python's flaws).

Re: Python 3: Ten years later

#73

I think Python 3 primarily showed that breaking backwards incompatibility across an entire ecosystem is worse than one could have predicted. Even today Python 2 is far from dead. On the other hand the core development team "outsourced" many of the issues that people actually want to have solved to the community like packaging and distribution. Python's biggest downfall is a highly academic approach with slow release…

I don’t tend to find much emoji in application code getting manipulated. Perhaps it makes some difference in user messages, however text space is dwarfed by images or even audio.

Makes me wonder how much a problem this is and where.

Re: Python 3: Ten years later

#74
post #18

As an outsider who only uses Python when I need a specific tool that's only available through pip: it's still one of my biggest nightmares. Every single time I need to install something with pip on MacOS there is this hour-long struggle with figuring out how to get the correct version of Python (2.7 vs 3) working with the correct version of pip working with the correct version of the library itself. I don't know, I g…

$ pip3 install foo

Or pip3.6 etc

--user is useful also

Re: Python 3: Ten years later

#75

I think Python 3 primarily showed that breaking backwards incompatibility across an entire ecosystem is worse than one could have predicted. Even today Python 2 is far from dead. On the other hand the core development team "outsourced" many of the issues that people actually want to have solved to the community like packaging and distribution. Python's biggest downfall is a highly academic approach with slow release…

> Even today Python 2 is far from dead

It's not dead, but as of now, it's mostly relegated to legacy code and a dwindling number of holdout programmers who refuse to adapt based on some misguided principle. It was a long and painful process, but existing libraries are dropping support for Python 2, and new libraries are created daily that will never support Python 2.

That said, I still regularly interact with people who are new to Python but have been indoctrinated somewhere with the belief that they must use Python 2.7. They've heard it's more stable, faster, or Google uses it. We discuss some of the actual tradeoffs, and they're quickly disabused of the notion that Python 2.7 is a good option for new Python projects today.

But I totally agree, some Python 3 additions (I'm looking at you, asyncio) have been handled in an unfortunate way.

Re: Python 3: Ten years later

#76
post #63

Please don't rewrite titles, especially to make them more baity. This is in the site guidelines: "Please use the original title, unless it is misleading or linkbait; don't editorialize." Titles are by far the strongest influence on discussion, so this rule is much more important than it seems. https://news.ycombinator.com/newsguidelines.html (Submitted title was "Python 3 Is Now 10 Years Old Was It Worth It?".)

If the "was it worth it?" bit is the focus of the piece, that's actually helpful and informative.

Not all title additions are bad.

Edit: not really the focus, it's more of an outline of an overview of what happened. But still.

Re: Python 3: Ten years later

#77
post #52

Earlier quoted context omitted.

Ok, I'll bite. This is the most straightforward way I can think of to implement the program you described. I think this is more or less what someone would come up with after glancing at the Python tutorial: https://gist.github.com/avian2/e3968bf933212ee561410b15495e6... What is wrong with it? It works as expected with non-ASCII characters in both command-line arguments and in input.txt (Python 3.5.3 on Linux, LANG=en…

I saved this page from the English Wikipedia as input.txt: https://en.wikipedia.org/wiki/Shinz%C5%8D_Abe C:\Users\local\tmp>python --version Python 3.7.1 C:\Users\local\tmp>python foo.py Diet Parliament Traceback (most recent call last): File "foo.py", line 7, in text = f.read() File "C:\Users\local\AppData\Local\Programs\Python\Python37-32\lib\encodings\ cp1252.py", line 23, in decode return codecs.charmap_decode(in…

The way I usually put it is that Python 3 shifted its priorities.

Previously, if you were a UNIX-y scripter writing UNIX-y scripts on your UNIX-y OS, the fact that Python just kind of pretended encoding issues would never exist was a help to you. It adopted the same "everything is ASCII, or at most UTF-8 in the ASCII range, and if it isn't I'll break in cryptic ways" approach as most other UNIX-y scripting things.

If you were doing anything other than UNIX-y scripting on your UNIX-y OS, this easily became a huge nightmare in Python 2. Django went through a massive rewrite early in its history precisely because of this, to ensure that encoding/decoding happened at the boundaries and everything you'd work with inside a Django app was already a Unicode string. And I remember what it was like trying to work on the web before that approach, and what the work to fix it was like.

Python 3 decided to make the UNIX-y scripters actually learn what a horrid mess UNIX is with respect to locales and encodings and filesystem paths, in order to free the rest of the Python community from the nightmares inflicted by prioritizing the UNIX-y scripters to the exclusion of everyone else. So yes, you have to do more work. Yes, you have to learn that a file path is actually an opaque bag of bytes that may not be in any actual encoding and thus can never properly decode to a string. Yes, you have to learn to use fsencode() and the surrogateescape handler in order not to blow up your scripts.

But I'm OK with that, because it puts the workload on you when you're using such a system, rather than magically trying to fix it for you at the cost of everyone else's sanity. It also means that you have to learn to write those scripts correctly. Which is more work than what Python 2 required, but not the world-ending apocalyptic horror it's usually presented as (and is, again, mostly the fault of UNIX-y systems doing their old UNIX-y things, not the fault of Python).

Re: Python 3: Ten years later

#78
post #63

Please don't rewrite titles, especially to make them more baity. This is in the site guidelines: "Please use the original title, unless it is misleading or linkbait; don't editorialize." Titles are by far the strongest influence on discussion, so this rule is much more important than it seems. https://news.ycombinator.com/newsguidelines.html (Submitted title was "Python 3 Is Now 10 Years Old Was It Worth It?".)

In the submission form, have the title field auto populated from the URL.

You don't have to look at many URLs to see how hard that would be.

Not to mention "unless it misleading or linkbait", which is not something code can take care of.

Re: Python 3: Ten years later

#79

Earlier quoted context omitted.

I don't have a Mac and maybe you've already tried this, but just in case, you can always do python2 -m pip install ... or python3 -m pip install ... to make sure it's running within that particular Python installation. You can use the --user flag to install to your user directory as well, if the system level is annoying.

why is it that the pip command can't handle what it's supposed to do, instead you have to resort to `python3 -m pip install`? Hell, it even breaks itself: pip install --upgrade pip # => pip unusable https://github.com/pypa/pip/issues/5447 https://github.com/pypa/pip/issues/5221 etc

Nope, pip2, pip3. I upgrade all the time no problems, lin and win however.

Re: Python 3: Ten years later

#80

No, IMO. Don't get me wrong, Python 3 is a better language than Python 2. I just don't think it's that much better that it was worth breaking backwards compatibility and stalling the language for several years. Python 3 did enough to break everyone's existing code, but nowhere near enough to make that worthwhile. It's common for other language communities to consider the Python 2/3 transition as an example of "what n…

I skipped 3.0-3.3 and used the logging module in every nontrivial program, so py3 never broke anything of consequence to me.
Post reply on HN