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

Class Adder

tests/test_virtual_functions.py:275–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 self.value = value
274
275 class Adder(m.Adder):
276 def __call__(self, first, second, visitor):
277 # lambda is a workaround, which adds extra frame to the
278 # current CPython thread. Removing lambda reveals the bug
279 # [https://github.com/pybind/pybind11/issues/3357]
280 (lambda: visitor(Data(first.value + second.value)))() # noqa: PLC3002
281
282 class StoreResultVisitor:
283 def __init__(self):

Callers 1

Calls

no outgoing calls

Tested by 1