massakam opened a new pull request #1951: Fixed Python sample code
URL: https://github.com/apache/incubator-pulsar/pull/1951
 
 
   Since there is a mistake in the sample code of Python, received messages can 
not be displayed correctly.
   ```py
   print("Received message '%s' id='%s'", msg.data(), msg.message_id())
   ↓
   print("Received message '%s' id='%s'" % (msg.data(), msg.message_id()))
   ```
   Moreover, `str.format()` should be used instead of the % formatting.
   ```py
   print("Received message '{}' id='{}'".format(msg.data(), msg.message_id()))
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to