John Salerno wrote: > Is there a way to assign multiple variables to the same value, but so > that an identity test still evaluates to False? > > e.g.: > > >>> w = x = y = z = False > >>> w > False > >>> x > False > >>> w == x > True > >>> w is x > True # not sure if this is harmful > > The first line above is the only way I know to do it, but it seems to > necessarily lead to the true identity test.
>>> class Foo : def __eq__(*blah) : return False >>> w = x = y = z = Foo() >>> w == x False >>> w is x True >>> -- http://mail.python.org/mailman/listinfo/python-list