any way to customize the is operator?

Fredrik Lundh fredrik at pythonware.com
Fri Jan 27 02:19:03 EST 2006


Lonnie Princehouse wrote:

> There doesn't seem to be any way to customize the behavior of "is" as
> can be done for other operators... why not?

because it does "id(a) == id(b)", and there's no way to customize
the behaviour of id().

(objects are not allowed to lie about who they are, or what they
are).

</F>






More information about the Python-list mailing list