Skip to content

Commit ed6983b

Browse files
authored
Add Human-readable description of MessageId object (#93)
1 parent e3eed2d commit ed6983b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/message.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ void export_message(py::module_& m) {
5555
oss << msgId;
5656
return oss.str();
5757
})
58+
.def("__repr__",
59+
[](const MessageId& msgId) {
60+
std::ostringstream oss;
61+
oss << msgId;
62+
return oss.str();
63+
})
5864
.def("__eq__", &MessageId::operator==)
5965
.def("__ne__", &MessageId::operator!=)
6066
.def("__le__", &MessageId::operator<=)

0 commit comments

Comments
 (0)