X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fcf33975379cd050a6d70b94ae7857910dd01217..4c753f8d4cabd4104f3f7109823f16be2ebdcce3:/src/bindings/python/simgrid_python.cpp diff --git a/src/bindings/python/simgrid_python.cpp b/src/bindings/python/simgrid_python.cpp index 8aad6d59f3..51b42fb299 100644 --- a/src/bindings/python/simgrid_python.cpp +++ b/src/bindings/python/simgrid_python.cpp @@ -641,7 +641,7 @@ PYBIND11_MODULE(simgrid, m) py::class_>( m, "Mailbox", "Mailbox. See the C++ documentation for details.") .def( - "__str__", [](const Mailbox* self) { return std::string("Mailbox(") + self->get_cname() + ")"; }, + "__str__", [](const Mailbox* self) { return "Mailbox(" + self->get_name() + ")"; }, "Textual representation of the Mailbox`") .def_static("by_name", &Mailbox::by_name, py::call_guard(), py::arg("name"), "Retrieve a Mailbox from its name") @@ -716,7 +716,7 @@ PYBIND11_MODULE(simgrid, m) "Retrieve the mailbox on which this comm acts.") .def_property_readonly("sender", &Comm::get_sender, py::call_guard()) - .def_property_readonly("state_str", [](const Comm* self){ return std::string(self->get_state_str()); }, + .def_property_readonly("state_str", &Comm::get_state_str, py::call_guard(), "Retrieve the Comm state as string") .def_property_readonly("remaining", &Comm::get_remaining,