Python Forum
valid numbers - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: valid numbers (/thread-777.html)



valid numbers - Skaperen - Nov-05-2016

is there anything (any string) that would be valid decimal.Decimal() but not valid float() and/or not valid int(,10)?  is there anything (any string) that would be valid float and/or valid int(,10) but not valid decimal.Decimal()?


RE: valid numbers - ichabod801 - Nov-05-2016

'NaN' is a valid decimal.Decimal() and a valid float(), but not a valid int(). Same with 'Infinity'.