]> git.llucax.com Git - software/pymin.git/blobdiff - pymin/services/util.py
Add a default __cmp__() implementation to pymin.seqtool.Sequence.
[software/pymin.git] / pymin / services / util.py
index b665c00e173dd4624e221018a579702628a7fc50..2fe7f9b6d45e3d9dcabdeb8f09c0670c5a92392a 100644 (file)
@@ -721,6 +721,13 @@ class ContainerSubHandler(SubHandler):
         except IndexError:
             raise ItemNotFoundError(index)
 
+    @handler(u'Remove all items (use with care).')
+    def clear(self):
+        if isinstance(self._attr(), dict):
+            self._attr.clear()
+        else:
+            self._attr(list())
+
     @handler(u'Get information about an item')
     def get(self, index):
         r"get(index) -> item :: List all the information of an item."