diff --git a/include/pybind/pybind.h b/include/pybind/pybind.h index 57009e66..9e707c12 100644 --- a/include/pybind/pybind.h +++ b/include/pybind/pybind.h @@ -813,7 +813,7 @@ public: enum_(object &scope, const char *name, const char *doc = nullptr) : class_(scope, name, doc), m_parent(scope) { auto entries = new std::unordered_map(); - this->def("__str__", [name, entries](Type value) -> std::string { + this->def("__repr__", [name, entries](Type value) -> std::string { auto it = entries->find((int) value); return std::string(name) + "." + ((it == entries->end()) ? std::string("???")