This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gdr
Recipients gdr
Date 2011-01-31.19:37:29
SpamBayes Score 1.1235213e-06
Marked as misclassified No
Message-id <1296502651.44.0.847909816314.issue11084@psf.upfronthosting.co.za>
In-reply-to
Content
xmlrpc.client (and xmlrpclib in 2.x) can't serialize instances of Decimal, throwing TypeError instead. Because XML is a textual format, converting from decimal to float may cause loss of data.

According to http://www.xmlrpc.com/spec, encoding Decimal as XML-RPC <double /> is allowed: "The range of allowable values is implementation-dependent, is not specified." Therefore, including decimal numbers that can not be represented by IEEE double is allowed by the spec.

Also, in my opinion, making a numeric type available in standard library unsupported by another part of standard library, is counterintuitive, but it's just my personal point of view.

I can provide a patch if this bug report is considered proper.
History
Date User Action Args
2011-01-31 19:37:31gdrsetrecipients: + gdr
2011-01-31 19:37:31gdrsetmessageid: <1296502651.44.0.847909816314.issue11084@psf.upfronthosting.co.za>
2011-01-31 19:37:29gdrlinkissue11084 messages
2011-01-31 19:37:29gdrcreate