Partially unrelated to the meme, but I find it almost malicious how some python keywords are named differently from the nearly universal counterpart of other languagues.
This/self, continue/pass, catch/except and they couldn’t find a different word for switch so they just didn’t implement it.
It’s as if the original designers purposefully wanted to be different for the sake of it.
TBF the last two bullet points are verbose descriptions of the thing it means in C++, Java, and Python too. It’s just that in JS, “this” can also be used in other places.
But yeah, in practice, every time I write JS I want to throw my hands in the air and shout “this is bullshit”, but never know what “this” refers to… :D
In Python, self is not a keyword, it’s a conventional variable name. You can replace all instances of “self” with “this” and your code will work the same.
Lua might have been a better choice, since
self
is special in lua.