From c51876b4d6fea0da3a561aaab2afd526dc0604ac Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 31 Jul 2014 18:43:40 +0200 Subject: [PATCH] Allow TruncatableSet to get no argument. --- src/utils/structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/structures.py b/src/utils/structures.py index 1be386ffd..db2a7706b 100644 --- a/src/utils/structures.py +++ b/src/utils/structures.py @@ -457,7 +457,7 @@ class CacheDict(collections.MutableMapping): class TruncatableSet(collections.MutableSet): """A set that keeps track of the order of inserted elements so the oldest can be removed.""" - def __init__(self, iterable): + def __init__(self, iterable=[]): self._ordered_items = list(iterable) self._items = set(self._ordered_items) def __contains__(self, item):