This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hans.bering
Recipients gpolo, hans.bering, kbk, r.david.murray, terry.reedy
Date 2011-07-14.18:55:23
SpamBayes Score 1.6653345e-16
Marked as misclassified No
Message-id <1310669724.03.0.800451907266.issue12558@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry for the misclassification, and thanks for correcting that.

I agree, this issue is most likely related to issue 10647; but at some level I think they must be different, because issue 10647 seems to be specific to Python 3.1 under Windows; I could not reproduce that issue neither under Ubuntu nor with Python 3.2 in Windows. This behaviour on the other hand I could reproduce with Python 2.7 and Python 3.2 in both Ubuntu and Windows. The underlying problem in both cases, I believe, is similar: That int/float arguments are somewhere turned into locale-dependent string representations and later parsed back using a potentially different locale.

Which brings me to why I consider this to be a bug - sorry for not having made that point clearer: The handling of the float argument depends on the system locale. If you change the example script to run with an English locale, you do not get an error; instead, the float is implicitly used as an int, and everything is fine. Only if you use German or a similar locale, will the float trigger an error. So the behaviour is at the very least inconsistent. If treating a float argument as an error is deemed acceptable, then this error should not be locale-dependent.
History
Date User Action Args
2011-07-14 18:55:24hans.beringsetrecipients: + hans.bering, terry.reedy, kbk, gpolo, r.david.murray
2011-07-14 18:55:24hans.beringsetmessageid: <1310669724.03.0.800451907266.issue12558@psf.upfronthosting.co.za>
2011-07-14 18:55:23hans.beringlinkissue12558 messages
2011-07-14 18:55:23hans.beringcreate