--- a/xmlclass/xsdschema.py Thu Nov 07 00:31:46 2013 +0100
+++ b/xmlclass/xsdschema.py Mon Nov 11 00:59:19 2013 +0100
@@ -45,7 +45,8 @@
return generateXMLTextMethod
def GenerateFloatXMLText(extra_values=[], decimal=None):
- float_format = ("{:.%dg}" % decimal).format if decimal is not None else str
+ float_format = (lambda x: "{:.{width}f}".format(x, width=decimal).rstrip('0') + if decimal is not None else str) def generateXMLTextMethod(value, name=None, indent=0):