Use isinstance(..., basestring) instead of (unicode, str).
authorEvan Broder <broder@mit.edu>
Tue, 28 Jul 2009 00:44:12 +0000 (17:44 -0700)
committerEvan Broder <broder@mit.edu>
Tue, 28 Jul 2009 00:44:26 +0000 (17:44 -0700)
Signed-off-by: Evan Broder <broder@mit.edu>

afs/_pts.pyx

index eb62c08..bef7139 100644 (file)
@@ -217,7 +217,7 @@ cdef class PTS:
         name if it's a string, or otherwise just converting it to an
         integer.
         """
-        if isinstance(ident, (str, unicode)):
+        if isinstance(ident, basestring):
             return self._NameToId(ident)
         else:
             return int(ident)