I'm surprised by the reactions to this. It's made immediately clear in the notebook that this is a fun look at some interesting behaviors of Python. There's no implication that there are bugs - I have no idea where anyone got that idea - except for the single actual bug in CPython that is mentioned (https://github.com/python/cpython/issues/54753).
I don't feel strongly about Python, but I do think CPython is a great way for people to learn a bit about how interpreted languages work. The code is quite easy to understand, and you can easily play with these interesting aspects of how languages and runtimes work. Does every Python programmer need to know the difference between `a = 256` and `a = 257`? No. Is it interesting? Yes. Should someone on your team know? Probably.
There's a lot of interesting stuff here. Understanding the difference between the conceptual idea of each line of code and what actually happens is fun, and, in some cases, important.
Bad requirements are bugs.
Bugs in understanding. Bugs in good taste.
A roach in your soup is a bug, even if the recipe says it should be there.
I think I know what you mean, but there's a line somewhere. Just because everyone doesn't understand the intricacies of the micro ops their cpu is using or every type of cache involved in various situations doesn't mean their computer is full of bugs.
Similarly, as long as the mental model of a Python programmer is in line with the results of executing some computation with Python, all is well.
a roach in your soup is not a bug if the recipe says it should be there, it's just something you have a preference against.
"You can cook them in numerous ways, from boiling to toasting. An especially delicious cockroach delicacy is said to exist on Madagascar." https://bucketlistjourney.net/edible-bugs-and-insects/
(a roach itself is a bug, different sense of the word bug, but presumably that's not what you are saying)
It probably wasn't a good idea to start it out is showing string constants aren't optimized. If they wanted to talk about really unintuitive reference gotchas initialization in optional function parameters would have been a way better example.
I appreciate the sentiment, but even this is a good example of why this stuff is interesting. Because some strings _are_ optimized (using some definition of "optimized"), but only in some cases.
It's these quirky little things where the code doesn't exactly represent the way execution happens in most straightforward mental models of how execution works. Again, it's not bad and it's not unique to Python. It's just the nitty gritty of how some things work.
I will say that calling it "What The Fuck Python" is certainly more attention-grabbing than "Some Interesting Bits About Python Internals You Probably Don't Need To Know". What're you gonna do. :)
I don't know I think "Python doesn't optimize <x>" is one of the least surprising classes of statements in programming.