diff --git a/bindings/python/sigrok/core/classes.i b/bindings/python/sigrok/core/classes.i index 01201bd3..2afd9cf1 100644 --- a/bindings/python/sigrok/core/classes.i +++ b/bindings/python/sigrok/core/classes.i @@ -426,6 +426,16 @@ std::map dict_to_map_options(PyObject *dict, return (long) $self; } + std::string __str__() + { + return $self->name(); + } + + std::string __repr__() + { + return "Class." + $self->name(); + } + %pythoncode { def __eq__(self, other):