And that's how I ended up on mastodon

@elyn Python types:

"Everything's an object, right"

"OK, sure"

"So type, the type of types, is a subclass of object"

"OK, ..."

"And object, since it's a type, is an instance of type"

"... wat?"

(the amount of "lying to computers" involved in starting a Python interpreter is genuinely fun, for a given definition of "fun")

@ancoghlan that's insane

@elyn Yeah, I advise folks to steer clear of the core type machinery implementation unless they actually *want* to stretch their brains into weird shapes in order to understand it. Lots of "this isn't quite true yet, but it will be true before it needs to be true, just trust us on that, computer".

I also love the fact that it is all completely *un*necessary knowledge for folks that just want to use Python without worrying about the fiddly details of how it works.

@ancoghlan I love fiddly details and non-euclidean neurology! It's good compilers don't appear to be conscious. I can't fathom the depths of their paranoia if they had to experience all the lies and coercion we put them through

@elyn @ancoghlan a lot of the python internal type machinery was added before python had spellable types, which now shows up as those strange breaks in the type math.

there's a similar case where `float` actually means `float | int`, so there's now no way of saying just float, no int, even though `isinstance(1, float) == False`.

@konstin @ancoghlan That's genuinely really cool to know tho, thank u :D