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

Class CustomRepr

tests/test_kwargs_and_defaults.cpp:45–51  ·  view source on GitHub ↗

test line breaks in default argument representation

Source from the content-addressed store, hash-verified

43
44 // test line breaks in default argument representation
45 struct CustomRepr {
46 std::string repr_string;
47
48 explicit CustomRepr(const std::string &repr) : repr_string(repr) {}
49
50 std::string __repr__() const { return repr_string; }
51 };
52
53 py::class_<CustomRepr>(m, "CustomRepr")
54 .def(py::init<const std::string &>())

Callers 1

TEST_SUBMODULEFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_SUBMODULEFunction · 0.68