The LHS is more challenging. Given: if x == 1: p_one() elif x == 2: p_two() elif x == 3: p_three() else: p_catchall() There is no guarantee that x is hashable. For example: class X: def __init__(self, value): self.value = value def __cmp__(self, y): return self.value == y x = X(2) Raymond |
_______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
