mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 09:50:01 +00:00
refactor
This commit is contained in:
parent
ca87a7e539
commit
a1317b604f
1 changed files with 2 additions and 2 deletions
|
|
@ -135,7 +135,7 @@ cdef class Packer(object):
|
|||
ret = msgpack_pack_false(&self.pk)
|
||||
elif PyLong_Check(o):
|
||||
# PyInt_Check(long) is True for Python 3.
|
||||
# Sow we should test long before int.
|
||||
# So we should test long before int.
|
||||
try:
|
||||
if o > 0:
|
||||
ullval = o
|
||||
|
|
@ -143,7 +143,7 @@ cdef class Packer(object):
|
|||
else:
|
||||
llval = o
|
||||
ret = msgpack_pack_long_long(&self.pk, llval)
|
||||
except OverflowError, oe:
|
||||
except OverflowError as oe:
|
||||
if not default_used and self._default is not None:
|
||||
o = self._default(o)
|
||||
default_used = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue