Implement __delitem__

This commit is contained in:
Eric Torres 2019-04-17 10:02:09 -07:00
parent 6b65e831a3
commit 2393511b11

View File

@ -100,9 +100,13 @@ class Repository(Hierarchy):
""" """
return name in self._snapshot_metadata return name in self._snapshot_metadata
def __delitem__(self, s): def __delitem__(self, index):
"""Delete a Snapshot in this Repository.""" """Delete a Snapshot in this Repository.
raise NotImplementedError
:param index: index of snapshot to delete
:type index: int
"""
del self._snapshots[index]
def __getitem__(self, idx): def __getitem__(self, idx):
"""Retrieve a Snapshot at a certain index.""" """Retrieve a Snapshot at a certain index."""