Skip to content

Commit e741b2a

Browse files
authored
Merge pull request #111 from timgraham/has_unicode
Remove unused _has_unicode/_str_cls vars
2 parents d6a7a49 + f34f9d2 commit e741b2a

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
@@ -76,17 +76,6 @@ def useOldServerHashFunction():
7676
serverHashFunction = binascii.crc32
7777

7878
from io import BytesIO
79-
if six.PY2:
80-
try:
81-
unicode
82-
except NameError:
83-
_has_unicode = False
84-
else:
85-
_has_unicode = True
86-
else:
87-
_has_unicode = True
88-
89-
_str_cls = six.string_types
9079

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

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)