diff options
Diffstat (limited to 'lib/sqlalchemy/util.py')
-rw-r--r-- | lib/sqlalchemy/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util.py b/lib/sqlalchemy/util.py index a0e0e244c..618900fcf 100644 --- a/lib/sqlalchemy/util.py +++ b/lib/sqlalchemy/util.py @@ -327,6 +327,10 @@ class HistoryArraySet(UserList.UserList): self.records = {} for l in list: self.append_nohistory(l) + def clear(self): + """clears the list and removes all history.""" + self.data[:] = [] + self.records = {} def added_items(self): """returns a list of items that have been added since the last "committed" state.""" return [key for key in self.data if self.records[key] is True] |