Allow TruncatableSet to get no argument.

This commit is contained in:
Valentin Lorentz 2014-07-31 18:43:40 +02:00
parent 00aaf79ef8
commit c51876b4d6

View File

@ -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):