瀏覽代碼

replaced old style "print" with a new print function

Roman Nekhoroshev 11 年之前
父節點
當前提交
1918a8cb1e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      publish_subscribe.py

+ 1 - 1
publish_subscribe.py

@@ -49,7 +49,7 @@ class Subscriber:
         self.provider.subscribe(msg, self)
         self.provider.subscribe(msg, self)
 
 
     def run(self, msg):
     def run(self, msg):
-        print "%s got %s" % (self.name, msg)
+        print("{} got {}".format(self.name, msg))
 
 
 
 
 def main():
 def main():