On 02/27/2013 03:48 AM, Burak Arslan wrote:
On 02/27/13 01:56, C Anthony Risinger wrote:
...this is a known pain point AFAICT:
http://bugs.python.org/issue2531
...but at the end of the day, Decimal is the most suitable primitive IMO.
I agree, that's why I say '[double] comes with its gotchas':
http://spyne.io/docs/reference/model.html#spyne.model.primitive.Double.
I'm going to make that text clearer though.
But if the user wants to use this, hey, it's in the XML Schema spec, we
can't stop them.
What do you think?
yeah it's all well and good... i definately wouldnt put too much time
into it since it's pretty much acceptably broken across all of Python.
the only thing i would suggest is rather than enabling for py2.6 only,
do a couple tests to see if Decimal is reliable, say:
if not (
Decimal('inf') == float('inf') and
Decimal('-inf') == float('-inf') and
Decimal('inf') > float('0') and
Decimal('-inf') < float('0')
):
[...]
...since some people say 2.6 works, others say it doesn't, etc etc...
since it all depends on the users hardware, keying off Python version
will be hit-or-miss at best.
--
C Anthony
-----------------------------------------
CONFIDENTIALITY: The information contained in this communication may be
confidential and is intended only for the use of the intended recipient(s). If
the reader of this message is not the intended recipient(s), you are hereby
notified that
any dissemination, distribution, or copying of this communication, or any of
its contents, is strictly prohibited. If you have received this communication
in error, please return it to the sender immediately and delete any copy of it
from your computer system.
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap