tonysun83 commented on a change in pull request #839: Fix tests to be 
compatible for both python2 and python3
URL: https://github.com/apache/couchdb/pull/839#discussion_r140938273
 
 

 ##########
 File path: src/mango/test/mango.py
 ##########
 @@ -44,7 +44,7 @@ def url(self):
         return "http://{}:{}/{}".format(self.host, self.port, self.dbname)
 
     def path(self, parts):
-        if isinstance(parts, (str, unicode)):
+        if isinstance(parts, ("".__class__, u"".__class__)):
 
 Review comment:
   only part worth of note. Another way to do this is : 
   ```
   try:
       basestring
   except NameError:
       basestring = str
   
   isinstance(s, basestring)
   ```
 
----------------------------------------------------------------
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