Explorar o código

switch to a quicker delete rather than reassignment

Daniel Gruno %!s(int64=5) %!d(string=hai) anos
pai
achega
c4335ced26
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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