From 2f4b6f11de78aff8e3f3180dadcaa85a81441de9 Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Sun, 31 May 2020 16:45:20 +0200 Subject: [PATCH] fixed a mistake in the TTLStack class --- ttlcollections/structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttlcollections/structures.py b/ttlcollections/structures.py index d60d980..cfe7f4d 100644 --- a/ttlcollections/structures.py +++ b/ttlcollections/structures.py @@ -129,7 +129,7 @@ class TTLStack: self.timer = timer self.ttl = ttl - self.size = size + self.size = size if size else math.inf self._stack = deque() def push(self, element, ttl: int = 0):