From 545d38b93d87d503af262647e910d6799f7d0375 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 25 Nov 2023 22:23:59 -0500 Subject: [PATCH] add to_tuple() to return a (cid, iid) pair --- mocha/core/InstanceKey.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mocha/core/InstanceKey.py b/mocha/core/InstanceKey.py index 3654905..7786350 100644 --- a/mocha/core/InstanceKey.py +++ b/mocha/core/InstanceKey.py @@ -23,4 +23,7 @@ class InstanceKey(): def __str__(self): return str(self.get_class_index()) + '$' + str(self.get_instance_index()) - \ No newline at end of file + + def to_tuple(self): + return (self.__class_id, self.__inst_id) +