Trivial bug fix: deque == [] is not a good way to check if a deque is empty.
This commit is contained in:
parent
ffdb8bb99c
commit
b562bc672b
|
@ -259,7 +259,7 @@ class fifo:
|
|||
return len(self.list)
|
||||
|
||||
def is_empty (self):
|
||||
return self.list == []
|
||||
return not self.list
|
||||
|
||||
def first (self):
|
||||
return self.list[0]
|
||||
|
|
Loading…
Reference in New Issue