guluo2016 commented on code in PR #7671:
URL: https://github.com/apache/hbase/pull/7671#discussion_r2754667570


##########
hbase-examples/src/main/python/thrift1/DemoClient.py:
##########
@@ -131,25 +123,25 @@ def demo_client(host, port, is_framed_transport):
   try:
     mutations = [Mutation(column="entry:foo", value=invalid)]
     client.mutateRow(t, invalid, mutations, dummy_attributes)
-  except ttypes.IOError, e:
-    print 'expected exception: %s' %(e.message)
+  except ttypes.IOError as e:
+    print(f'expected exception: {e.message}')
 
   # Run a scanner on the rows we just created
-  print "Starting scanner..."
+  print("Starting scanner...")
   scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes)
 
   r = client.scannerGet(scanner)
   while r:
     printRow(r[0])
     r = client.scannerGet(scanner)
-  print "Scanner finished"
+  print("Scanner finished")
 
   #
   # Run some operations on a bunch of rows.
   #
   for e in range(100, 0, -1):
     # format row keys as "00000" to "00100"
-    row = "%0.5d" % (e)
+    row = f"{row:05}"

Review Comment:
   There is an error in here, should use `e` .
   ```
       row = f"{row:05}"
                ^^^
   NameError: name 'row' is not defined. Did you mean: 'pow'?
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to