Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What's New in Python 3.11?. Parent comment
I'm a huge Python fanboy and this line is absolutely awful.
Comparison chains are great for stuff like "x < y < z" or "x == y == z", but the operators should never be mixed.
"Readability counts" is, IMO, the most important line in the Zen of Python, and that line is unreadable. I imagine it's equivalent to:
return headers.get('x-foo') == settings.FOO_KEY and settings.FOO_KEY is not None
There are no comments on this comment yet.
I'm a huge Python fanboy and this line is absolutely awful.
Comparison chains are great for stuff like "x < y < z" or "x == y == z", but the operators should never be mixed.
"Readability counts" is, IMO, the most important line in the Zen of Python, and that line is unreadable. I imagine it's equivalent to:
Which, admittedly, feels like a clumsy line of code, but it's at least readable.