[Spambayes-checkins] spambayes/Outlook2000/dialogs AsyncDialog.py,
1.4, 1.5
Tim Peters
tim.one at comcast.net
Mon Jul 21 00:12:17 EDT 2003
[Tony Meyer]
> It doesn't seem to multiply, just ignore the '.'. For example:
> >>> locale.setlocale(locale.LC_NUMERIC, "German")
> >>> 'German_Germany.1252' s = locale.atof("3,14") s
> 3.1400000000000001
> >>> s = locale.atof("3.14")
> >>> s
> 314.0
> >>>
Damn foreigners <wink>.
If this somehow managed to be in effect while the .py files were getting
compiled, then I suppose
stages = ("Training", .9), ("Saving", .1)
could turn into (in God's spelling)
stages = ("Training", 9.0), ("Saving", 1.0)
but then also
assert (abs(start_pos-1.0)) < 0.001,
would turn into
assert (abs(start_pos-10.0)) < 1.0, \
and that still would be true (asserting 0.0 < 1.0). So maybe it's that
stages = ("Training", .3), ("Saving", .1), ("Scoring", .6)
turns into
stages = ("Training", 3.0), ("Saving", 1.0), ("Scoring", 4.0)
But same thing in the end: they sum to 10.0, and the difference is again 0.
> Back when I was playing around with locale settings & Outlook to try
> and sort out the problems there, I noticed this behaviour in code
> without the locale.atof calls as well. I can't remember how to
> reproduce it now, though ;) classifier.LN2 kept ending up as >0,
> though, and the call there is just "LN2 = math.log(2)".
classifier.LN2 should be > 0; log(2) ~= 0.69.
More information about the Spambayes-checkins
mailing list