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

Class MyClass

tests/test_callbacks.py:40–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38def test_bound_method_callback():
39 # Bound Python method:
40 class MyClass:
41 def double(self, val):
42 return 2 * val
43
44 z = MyClass()
45 assert m.test_callback3(z.double) == "func(43) = 86"

Callers 1

Calls

no outgoing calls

Tested by 1