added missing equality operator for DurationWrapper in Python (M3 exptime fix) (#615)

This commit is contained in:
Erik Fröjdh
2023-01-16 14:12:12 +01:00
committed by GitHub
parent 22b3229d94
commit e747a5811f
2 changed files with 13 additions and 2 deletions

View File

@ -12,6 +12,7 @@ void init_duration(py::module &m) {
.def("total_seconds", &DurationWrapper::total_seconds)
.def("count", &DurationWrapper::count)
.def("set_count", &DurationWrapper::set_count)
.def("__eq__", &DurationWrapper::operator==)
.def("__repr__", [](const DurationWrapper &self) {
std::stringstream ss;
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()