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

Class TracedClass

Lib/test/test_trace.py:103–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103class TracedClass(object):
104 def __init__(self, x):
105 self.a = x
106
107 def inst_method_linear(self, y):
108 return self.a + y
109
110 def inst_method_calling(self, x):
111 c = self.inst_method_linear(x)
112 return c + traced_func_linear(x, c)
113
114 @classmethod
115 def class_method_linear(cls, y):
116 return y * 2
117
118 @staticmethod
119 def static_method_linear(y):
120 return y * 2
121
122
123#------------------------------ Test cases -----------------------------------#

Callers 2

test_linear_methodsMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_linear_methodsMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…