by coldtea · 7y ago · 0 comments
Python should have prevented checking primitives with is though -- only let object pointers...
That would have been less surprising (since for < 256 the singleton-ness means all same valued instances have the same "address" (id), so behave in equality check as if they were plain numbers).
[0]: https://github.com/python/cpython/blob/master/Objects/longob...