The documentation tells that objects of different type are ordered arbitrailiy but consistently. You compare a class with an integer and a list, see : http://www.python.org/doc/2.3.5/lib/comparisons.html