Re:Python FAQ: Equality
by rflynn on Saturday April 14, 2012 @04:47PM
(#3841947)
Good stuff. I was playing around with ordinality of language built-ins recently and found unintuitive results for Python (https://github.com/rflynn/wat/blob/master/src/py.ord.png). As your article mentions there is a fine line between language and implementation detail.
[ Parent
| on HN ]
http://docs.python.org/library/stdtypes.html#comparisons
CPython implementation detail: Objects of different types except numbers are ordered by their type names; objects of the same types that don’t support proper comparison are ordered by their address.