From b9d89fb346909dee29df4256db4cddb861db3367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 25 May 2022 07:35:40 +0300 Subject: [PATCH] BaseSpec.__repr__() --- qpms/cybspec.pyx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qpms/cybspec.pyx b/qpms/cybspec.pyx index 866c440..45cf286 100644 --- a/qpms/cybspec.pyx +++ b/qpms/cybspec.pyx @@ -139,6 +139,9 @@ cdef class BaseSpec: # TODO raise correct errors (TypeError on bad type of key, IndexError on exceeding index) return self.__ilist[key] + def __repr__(self): + return 'BaseSpec([' + ','.join('%d' % i for i in self.__ilist) + '])' + property ilist: def __get__(self): return self.__ilist