Bugs item #1084279, was opened at 2004-12-13 11:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1084279&group_id=5470
Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Antoine Pitrou (pitrou) Assigned to: Nobody/Anonymous (nobody) Summary: status of small floats in xml-rpc ? Initial Comment: Hi, I've been reading through the xmlrpclib.py code to see that floats are marshalled the following way: def dump_double(self, value, write): write("<value><double>") write(repr(value)) write("</double></value>\n") dispatch[FloatType] = dump_double Using repr() means that small or big floats, for example, will be output using the exponent notation: >>> repr(2**-15) '3.0517578125e-05' Unfortunately, the XML-RPC specification does not allow this notation: "At this time, only decimal point notation is allowed, a plus or a minus, followed by any number of numeric characters, followed by a period and any number of numeric characters. Whitespace is not allowed. The range of allowable values is implementation-dependent, is not specified." (http://www.xmlrpc.com/spec) Thus floats marshalled using xmlrpclib may not be readable using other XML-RPC implementations. (I don't have any concrete data about this though) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1084279&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com