summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Tomkins <tomkins@darkzone.net>2016-11-16 20:18:19 +0000
committerAlex Tomkins <tomkins@darkzone.net>2016-12-04 23:15:37 +0000
commitf5e3538b3a02c9ae099ebc372cd568a8fe7e99a7 (patch)
tree63de4b33000f9efad0388f76d19f6214c7550e7a
parent1c565fb472c07dffcf95f925b647f17f3e86aa43 (diff)
downloadpymemcache-f5e3538b3a02c9ae099ebc372cd568a8fe7e99a7.tar.gz
Use is type for type comparisons
More pythonic
-rw-r--r--pymemcache/serde.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pymemcache/serde.py b/pymemcache/serde.py
index ffe9b16..03ba8cc 100644
--- a/pymemcache/serde.py
+++ b/pymemcache/serde.py
@@ -36,18 +36,18 @@ def python_memcache_serializer(key, value):
# Check against exact types so that subclasses of native types will be
# restored as their native type
- if value_type == six.binary_type:
+ if value_type is six.binary_type:
pass
- elif value_type == six.text_type:
+ elif value_type is six.text_type:
flags |= FLAG_TEXT
value = value.encode('utf8')
- elif value_type == int:
+ elif value_type is int:
flags |= FLAG_INTEGER
value = "%d" % value
- elif six.PY2 and value_type == long_type:
+ elif six.PY2 and value_type is long_type:
flags |= FLAG_LONG
value = "%d" % value