action_list: remove show method
Also adds __iter__ so we can use an action_list as a sequence.
diff --git a/src/python/of10/action_list.py b/src/python/of10/action_list.py
index c2ab07e..2c5a906 100644
--- a/src/python/of10/action_list.py
+++ b/src/python/of10/action_list.py
@@ -143,19 +143,12 @@
length += act.__len__()
return length
+ def __iter__(self):
+ return self.actions.__iter__()
+
def __eq__(self, other):
if type(self) != type(other): return False
if self.actions != other.actions: return False
return True
def __ne__(self, other): return not self.__eq__(other)
-
- def show(self, prefix=''):
- outstr = prefix + "Action List with " + str(len(self.actions)) + \
- " actions\n"
- count = 0
- for obj in self.actions:
- count += 1
- outstr += prefix + " Action " + str(count) + ": \n"
- outstr += obj.show(prefix + ' ')
- return outstr