Merge pull request #111 from timgraham/has_unicode
Remove unused _has_unicode/_str_cls vars
This commit is contained in:
11
memcache.py
11
memcache.py
@@ -76,17 +76,6 @@ def useOldServerHashFunction():
|
||||
serverHashFunction = binascii.crc32
|
||||
|
||||
from io import BytesIO
|
||||
if six.PY2:
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
_has_unicode = False
|
||||
else:
|
||||
_has_unicode = True
|
||||
else:
|
||||
_has_unicode = True
|
||||
|
||||
_str_cls = six.string_types
|
||||
|
||||
valid_key_chars_re = re.compile(b'[\x21-\x7e\x80-\xff]+$')
|
||||
|
||||
|
||||
@@ -6,17 +6,6 @@ import six
|
||||
|
||||
from memcache import Client, SERVER_MAX_KEY_LENGTH, SERVER_MAX_VALUE_LENGTH
|
||||
|
||||
try:
|
||||
_str_cls = basestring
|
||||
except NameError:
|
||||
_str_cls = str
|
||||
|
||||
|
||||
def to_s(val):
|
||||
if not isinstance(val, _str_cls):
|
||||
return "%s (%s)" % (val, type(val))
|
||||
return "%s" % val
|
||||
|
||||
|
||||
class FooStruct(object):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user