Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused _has_unicode/_str_cls vars #111

Merged
merged 1 commit into from
Dec 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,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]+$')

Expand Down
11 changes: 0 additions & 11 deletions tests/test_memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@

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):

Expand Down