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

Class Object

Lib/test/test_weakref.py:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49class Object:
50 def __init__(self, arg):
51 self.arg = arg
52 def __repr__(self):
53 return "<Object %r>" % self.arg
54 def __eq__(self, other):
55 if isinstance(other, Object):
56 return self.arg == other.arg
57 return NotImplemented
58 def __lt__(self, other):
59 if isinstance(other, Object):
60 return self.arg < other.arg
61 return NotImplemented
62 def __hash__(self):
63 return hash(self.arg)
64 def some_method(self):
65 return 4
66 def other_method(self):
67 return 5
68
69
70class RefCycle:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…