Skip to content

Commit 3b580c1

Browse files
committed
Remove unused _has_unicode/_str_cls vars
Unused since 4f1c78c13bd54050b1d2d3baa9e86d9e79b3629.
1 parent b13d6fc commit 3b580c1

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

memcache.py

-11
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,6 @@ def useOldServerHashFunction():
7878
serverHashFunction = binascii.crc32
7979

8080
from io import BytesIO
81-
if six.PY2:
82-
try:
83-
unicode
84-
except NameError:
85-
_has_unicode = False
86-
else:
87-
_has_unicode = True
88-
else:
89-
_has_unicode = True
90-
91-
_str_cls = six.string_types
9281

9382
valid_key_chars_re = re.compile(b'[\x21-\x7e\x80-\xff]+$')
9483

tests/test_memcache.py

-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@
66

77
from memcache import Client, SERVER_MAX_KEY_LENGTH, SERVER_MAX_VALUE_LENGTH
88

9-
try:
10-
_str_cls = basestring
11-
except NameError:
12-
_str_cls = str
13-
14-
15-
def to_s(val):
16-
if not isinstance(val, _str_cls):
17-
return "%s (%s)" % (val, type(val))
18-
return "%s" % val
19-
209

2110
class FooStruct(object):
2211

0 commit comments

Comments
 (0)