Changeset 1248
- Timestamp:
- Feb 16, 2014, 7:43:20 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/genshi/compat.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/genshi/compat.py
r1156 r1248 35 35 'Python 2 compatibility function. Not usable in Python 3.') 36 36 37 38 # We need to test if an object is an instance of a string type in places 39 40 if IS_PYTHON2: 41 def isstring(obj): 42 return isinstance(obj, basestring) 43 else: 44 def isstring(obj): 45 return isinstance(obj, str) 37 46 38 47 # We need to differentiate between StringIO and BytesIO in places … … 113 122 return False 114 123 return True 115
Note: See TracChangeset
for help on using the changeset viewer.
