merlimat closed pull request #1951: Fixed Python sample code
URL: https://github.com/apache/incubator-pulsar/pull/1951
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/site/docs/latest/clients/Python.md 
b/site/docs/latest/clients/Python.md
index c67357dee1..1b59d57357 100644
--- a/site/docs/latest/clients/Python.md
+++ b/site/docs/latest/clients/Python.md
@@ -93,7 +93,7 @@ consumer = client.subscribe('my-topic', 'my-subscription')
 
 while True:
     msg = consumer.receive()
-    print("Received message '%s' id='%s'", msg.data(), msg.message_id())
+    print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
     consumer.acknowledge(msg)
 
 client.close()
@@ -111,6 +111,6 @@ reader = client.create_reader('my-topic', msg_id)
 
 while True:
     msg = reader.receive()
-    print("Received message '%s' id='%s'", msg.data(), msg.message_id())
+    print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
     # No acknowledgment
 ```


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to