Remove is_str and replace by isinstance(..., six.string_types).

This commit is contained in:
Stefan van der Walt
2013-06-29 10:16:42 -05:00
parent 70d21f23a2
commit 9a38a59a25
2 changed files with 3 additions and 14 deletions
+1 -12
View File
@@ -2,18 +2,7 @@ import warnings
import functools
__all__ = ['deprecated', 'is_str']
try:
isinstance("", basestring)
def is_str(s):
"""Return True if `s` is a string. Safe for Python 2 and 3."""
return isinstance(s, basestring)
except NameError:
def is_str(s):
"""Return True if `s` is a string. Safe for Python 2 and 3."""
return isinstance(s, str)
__all__ = ['deprecated']
class deprecated(object):