Browse Source

switch to a quicker delete rather than reassignment

Daniel Gruno 5 năm trước cách đây
mục cha
commit
c4335ced26
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pypubsub.py

+ 1 - 1
pypubsub.py

@@ -228,7 +228,7 @@ class Payload:
         # Private payload?
         if self.topics[0] == 'private':
             self.private = True
-            self.topics = self.topics[1:]  # Remove the private bit from topics now.
+            del self.topics[0]  # Remove the private bit from topics now.
 
         self.json['pubsub_topics'] = self.topics
         self.json['pubsub_path'] = path