Message127651
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. |
|
Date |
User |
Action |
Args |
2011-01-31 19:37:31 | gdr | set | recipients:
+ gdr |
2011-01-31 19:37:31 | gdr | set | messageid: <1296502651.44.0.847909816314.issue11084@psf.upfronthosting.co.za> |
2011-01-31 19:37:29 | gdr | link | issue11084 messages |
2011-01-31 19:37:29 | gdr | create | |
|