8000 strict type check for ext type · sugarguo/msgpack-python@628c519 · GitHub
[go: up one dir, main page]

Skip to content

Commit 628c519

Browse files
committed
strict type check for ext type
1 parent 9b67327 commit 628c519

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msgpack/_packer.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ cdef class Packer(object):
213213
if ret != 0: break
214214
ret = self._pack(v, nest_limit-1)
215215
if ret != 0: break
216-
elif isinstance(o, ExtType):
216+
elif type(o) is ExtType if strict_types else isinstance(o, ExtType):
217217
# This should be before Tuple because ExtType is namedtuple.
218218
longval = o.code
219219
rawval = o.data

0 commit comments

Comments
 (0)
0