Skip to content

Instantly share code, notes, and snippets.

@cdfox
Created December 24, 2017 02:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdfox/163161ba0b6cf134ce00ebcef34d4a16 to your computer and use it in GitHub Desktop.
Save cdfox/163161ba0b6cf134ce00ebcef34d4a16 to your computer and use it in GitHub Desktop.
class foo:
def __eq__(self, o):
return False
t = (foo(),)
t2 = (t[0],)
t == t2 # True
t[0] == t2[0] # False
t[0] is t2[0] # True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment