MCPcopy Create free account
hub / github.com/pybind/pybind11 / MyClass

Class MyClass

tests/test_class_sh_trampoline_unique_ptr.py:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class MyClass(m.Class):
7 def foo(self):
8 return 10 + self.get_val()
9
10 def clone(self):
11 cloned = MyClass()
12 cloned.set_val(self.get_val() + 3)
13 return cloned
14
15
16def test_m_clone():

Callers 3

cloneMethod · 0.70
test_m_cloneFunction · 0.70
test_m_clone_and_fooFunction · 0.70

Calls

no outgoing calls

Tested by 3

cloneMethod · 0.56
test_m_cloneFunction · 0.56
test_m_clone_and_fooFunction · 0.56