MCPcopy Index your code
hub / github.com/python/cpython / Y

Class Y

Lib/test/test_set.py:1914–1922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1912 def __hash__(self):
1913 return 0
1914 class Y:
1915 flag = False
1916 def __hash__(self):
1917 return 0
1918 def __eq__(self, other):
1919 if not self.flag:
1920 self.flag = True
1921 s.add(X())
1922 return self is other
1923
1924 a = X()
1925 s = set()

Callers 1

Calls

no outgoing calls

Tested by 1