def _eq(left, right):
if isinstance(left, (tuple, list)) and isinstance(right, (tuple, list)):<EOL><INDENT>return len(left) == len(right) and all(_eq(*pair) for pair in zip(left, right))<EOL><DEDENT>else:<EOL><INDENT>return left == right<EOL><DEDENT>
Equality comparison that allows for equality between tuple and list types
with equivalent elements.