Live data from Hacker News

Python 3.8 Makes me Sad Again

ilya-sher.org

21–30 of 48 posts

Re: Python 3.8 Makes me Sad Again

#21

“Somebody” ignored the wisdom of Lisp, which was “everything is an expression and evaluates to a value” (no statements vs expressions), and made assignment a statement in Python years ago. This was the philosophy of Algol. That is why ":=" was invented there. From Lex Fridman interview I understood that Guido was not educated enough to understand some issues, and tried to fix them afterwards. :-)

Funny, a very similar sentiment, but inverted was expressed in a rant about c# shared on here a couple of days ago - typing `foo.bar()` and implicitly discarding the result, because you assumed foo.bar() was a statement.

My first though was "that's the single largest cause of avoidable bugs in my python code".

Re: Python 3.8 Makes me Sad Again

#22

So the author is sad because Python 3.8 fixes things... too late for their taste? And they, "as an author of another programming language" would've known better and never made these "mistakes" to begin with? Get off your high horse.

[deleted]

Re: Python 3.8 Makes me Sad Again

#23
Is the author sad because Python 3.8 is fixing things? What would he rather have them do? Not fix things?

Or is he sad because millions of people around the world use Python instead of his shiny new esolang where he’s managed to get all the things right™?

Hindsight is always 20/20. This kind of snark achieves nothing.

Re: Python 3.8 Makes me Sad Again

#25
I don't understand the parameter section. What fundamental mistake is python trying to remedy with the must-be-positional parameter?

I don't get why you would want to force people to not name a parameter.

Like, why is it so bad that I write:

    myval = mydict.get(mykey, default=mydefault)
Who does it help that this throws an error?

Re: Python 3.8 Makes me Sad Again

#26

I don't understand the parameter section. What fundamental mistake is python trying to remedy with the must-be-positional parameter? I don't get why you would want to force people to not name a parameter. Like, why is it so bad that I write: myval = mydict.get(mykey, default=mydefault) Who does it help that this throws an error?

https://www.python.org/dev/peps/pep-0570/

Re: Python 3.8 Makes me Sad Again

#27

Why is it useful for maps to be sorted by insertion order?

However the author did not mention stable order does not come for free. It is not a trivial decision to make, between ordered and unordered dicts.

Actually in this case I believe it did come for free due to a change in the way dict was implemented in 3.6:

https://mail.python.org/pipermail/python-dev/2016-September/...

Re: Python 3.8 Makes me Sad Again

#28
post #3

Q: Python 3.9 is better ? https://docs.python.org/3.9/whatsnew/3.9.html

If you're a teapot, it's definitely better.

> HTTP status codes 103 EARLY_HINTS, 418 IM_A_TEAPOT and 425 TOO_EARLY are added to http.HTTPStatus. (Contributed by Dong-hee Na in bpo-39509 and Ross Rhodes in bpo-39507.)

Re: Python 3.8 Makes me Sad Again

#29
post #9

I don’t get the part about unordered maps. Python never promised ordered dicts (until 3.7) it wasn’t a secret nor did you have any reason to believe that they would be ordered. I mean they’re ordered now and that provide some benefit in terms of simpler code in some cases, but it was never a problem as such.

Besides, Python already had OrderedDict in the standard library for a decade.

Re: Python 3.8 Makes me Sad Again

#30
post #24

Why is it useful for maps to be sorted by insertion order?

You can use the same structure to output data to the screen (or elsewhere) and to find stuff by the key.

In other words, I must pay the cost of maintaining the ordering even in the 99% of cases when it will not be used.
Post reply on HN