<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alan Isaac wrote:
<blockquote cite="mid_JAVh.1700$jR5.897@trnddc08" type="cite">
  <pre wrap="">"Terry Reedy" <a class="moz-txt-link-rfc2396E" href="mailto:tjreedy@udel.edu"><tjreedy@udel.edu></a> wrote in message
<a class="moz-txt-link-freetext" href="news:mailman.6686.1176934558.32031.python-list@python.org">news:mailman.6686.1176934558.32031.python-list@python.org</a>...
  </pre>
  <blockquote type="cite">
    <pre wrap="">Should be in the reference manual section on comparisons.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Only to this extent:
<a class="moz-txt-link-freetext" href="http://www.python.org/doc/2.4/ref/comparisons.html">http://www.python.org/doc/2.4/ref/comparisons.html</a>

        objects of different types always compare unequal, and are ordered
        consistently but arbitrarily.

        (This unusual definition of comparison was used to simplify the
        definition of operations like sorting and the in and not in
operators.
        In the future, the comparison rules for objects of different types
are
        likely to change.)

        ...  Most other types compare unequal unless they are the same
object;
        the choice whether one object is considered smaller or larger than
        another one is made arbitrarily but consistently within one
execution
        of a program.

This does not provide a direct answer to "why" None comparisons.
(As far as I can tell, None is less than any object.)

However, Gary Herron's explanation makes sense: this provides a stable
sort when None is involved, and meets the criterion that objects of
different types must always compare unequal.  However this would also
be true if None always compared greater than any object, and the current
behavior does not seem to be guaranteed.

Is that about right?

Cheers,
Alan Isaac


  </pre>
</blockquote>
I love scripting languages ... but sometimes an explicit evaluation
that one would find in<br>
a compiled language is better.<br>
Which is why I suggested using the explicit type(x) == types.NoneType
as opposed to<br>
x is None<br>
<br>
<br>
</body>
</html>