Past: https://news.ycombinator.com/item?id=49284392 (with my comment), https://news.ycombinator.com/item?id=49250370 .
Nice to see it get attention this time.
I remember reading that in early versions of Python there was no built in True and False. Each user would implement this themselves as
True = 1
False = 0
then later these got added to the language. In Python 2 you could still reassign and swap them so that 'if False' was actually true!
True, False = False, True
Python 3 you could no longer reassign them.
The __debug__ constant is really weird - any block of code guarded with `if __debug__:` will be entirely omitted from the bytecode under PYTHONOPTIMIZE=1. This and `assert` are the only two examples of real “conditional compilation” in Python. This is also the reason why you cannot assign to __debug__: doing so would make it possible to invalidate the compiler’s assumption about `if __debug__:` statements.
Isn't "..." then also behaving like True, False and None, i.e. being a lexical token that rewolves to a hardwired value during parsing?
Python is three scripting languages in a trench-coat.
Wow, I wish to understand the internal details of Python implementation that makes it behave in such a way :)
I used to like Python in the 2010s when it felt like a breath of fresh air relative to PHP and Perl.
Now it feels like a weird PHP itself that is slow, brittle, and dangerous to write code at scale in.
The loose typing, potluck standard library, and horrible package manager (insofar as the community does not know how to package code) all feel so dated.
I made a constant library for python which I liked some years ago. I wonder if any of my ideas made it in:
https://github.com/nucypher/constantSorrow/blob/master/tests...
just my 2c but py is honestly one of the worst languages and ecosystems i’ve used in my life.
for all the hate js used to get, py is at least a few magnitudes worse.
my opinion ofc. don’t get mad xD
Python is awful. There are so many one offs in libraries, none agree on a style, it’s slow, and it’s way too easy to do the wrong thing. I often work with data scientists and have to productionize their jupyter notebooks which is pure suboptimal hell. I guess it must be a good easy learning curve for research/scratchpad