]> granicus.if.org Git - python/commitdiff
Trivial bug fix: deque == [] is not a good way to check if a deque is empty.
authorArmin Rigo <arigo@tunes.org>
Mon, 27 Sep 2004 17:49:00 +0000 (17:49 +0000)
committerArmin Rigo <arigo@tunes.org>
Mon, 27 Sep 2004 17:49:00 +0000 (17:49 +0000)
Lib/asynchat.py

index 062ab3eb7825137ec15dbb3c2188bc98570e1828..28b89a2bde4021ac00c52931387c10f2dd7bee32 100644 (file)
@@ -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]