Attribute error: Rich comparison configuration
<p>I have a class <code>Point</code> with <code>x</code>and <code>y</code> attributes. I'd like to get <code>False</code> comparing a <code>Point</code> object with any other type of object. For instance, <code>Point(0, 1) == None</code> fails: </p>

<pre><code>AttributeError: 'NoneType' object has no attribute 'x'
</code></pre>

<p>The class:</p>

<pre><code>class Point():

    def __init__(self, x, y):
        self.x = x
        self.y = y

    def __eq__(self, other):
        return self.x == other.x and self.y == other.y

    def __ne__(self, other):
        return not self.__eq__(other)
</code></pre>

<p>How do I configure <code>__eq__</code>to get <code>False</code> in comparison with any other object type?</p>
