-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integer value is not accepted for Double value type #227
Comments
From the documentation of
I would therefore say, this is a feature, not a bug, considering the first value you put in is actually an integer, that has different semantics, whereas Double and floats argually have more similar semantics. |
@s-heppner It depends how you interpret https://www.w3.org/TR/xmlschema11-2/#double:
https://www.w3.org/TR/xmlschema-2/#double :
|
I see your point. I have been thinking about this problem, but I have not really come to a good solution. |
My take is that python numbers are simply different from XML numbers, so we cannot apply the same rules here. While in XML Allowing |
this minimal example does not work and produce the following error:
TypeError: 1 cannot be trivially casted into float
the code only works if it is explicitly a float value:
is that a feature or bug?
The text was updated successfully, but these errors were encountered: