summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-10-23 20:11:00 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-10-23 20:11:00 (GMT)
commit2bb96f593a067dafc7f02fef659ff22994b83399 (patch)
treeb2b2acc64f5e4e6da3d98541544c72b2a439e98a /Lib/xmlrpc
parent8d48b43ea9abe494527acea05dcd6b8d067278ea (diff)
downloadcpython-2bb96f593a067dafc7f02fef659ff22994b83399.zip
cpython-2bb96f593a067dafc7f02fef659ff22994b83399.tar.gz
cpython-2bb96f593a067dafc7f02fef659ff22994b83399.tar.bz2
Cleanup code: remove int/long idioms and simplify a while statement.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/client.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index 19d4d69..3cd000a 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -535,15 +535,6 @@ class Marshaller:
write("<value><nil/></value>")
dispatch[type(None)] = dump_nil
- def dump_int(self, value, write):
- # in case ints are > 32 bits
- if value > MAXINT or value < MININT:
- raise OverflowError("int exceeds XML-RPC limits")
- write("<value><int>")
- write(str(value))
- write("</int></value>\n")
- #dispatch[int] = dump_int
-
def dump_bool(self, value, write):
write("<value><boolean>")
write(value and "1" or "0")
@@ -558,6 +549,9 @@ class Marshaller:
write("</int></value>\n")
dispatch[int] = dump_long
+ # backward compatible
+ dump_int = dump_long
+
def dump_double(self, value, write):
write("<value><double>")
write(repr(value))