This is an automated email from the ASF dual-hosted git repository. xyz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git
The following commit(s) were added to refs/heads/main by this push: new ed6983b Add Human-readable description of MessageId object (#93) ed6983b is described below commit ed6983b6f0575e9807c5386891edf20de914a662 Author: Eric Hare <ericrh...@gmail.com> AuthorDate: Tue Feb 14 19:45:29 2023 -0700 Add Human-readable description of MessageId object (#93) --- src/message.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/message.cc b/src/message.cc index 1924bc2..6e8dd3f 100644 --- a/src/message.cc +++ b/src/message.cc @@ -55,6 +55,12 @@ void export_message(py::module_& m) { oss << msgId; return oss.str(); }) + .def("__repr__", + [](const MessageId& msgId) { + std::ostringstream oss; + oss << msgId; + return oss.str(); + }) .def("__eq__", &MessageId::operator==) .def("__ne__", &MessageId::operator!=) .def("__le__", &MessageId::operator<=)