Procházet zdrojové kódy

switch to a quicker delete rather than reassignment

Daniel Gruno před 5 roky
rodič
revize
c4335ced26
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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