Is there a way to assign multiple variables to the same value, but so
that an identity test still evaluates to False?
e.g.:
[color=blue][color=green][color=darkred]
>>> w = x = y = z = False
>>> w[/color][/color][/color]
False[color=blue][color=green][color=darkred]
>>> x[/color][/color][/color]
False[color=blue][color=green][color=darkred]
>>> w == x[/color][/color][/color]
True[color=blue][color=green][color=darkred]
>>> w is x[/color][/color][/color]
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.
that an identity test still evaluates to False?
e.g.:
[color=blue][color=green][color=darkred]
>>> w = x = y = z = False
>>> w[/color][/color][/color]
False[color=blue][color=green][color=darkred]
>>> x[/color][/color][/color]
False[color=blue][color=green][color=darkred]
>>> w == x[/color][/color][/color]
True[color=blue][color=green][color=darkred]
>>> w is x[/color][/color][/color]
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.
Comment