mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Allow TruncatableSet to get no argument.
This commit is contained in:
parent
00aaf79ef8
commit
c51876b4d6
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user