[Python-Dev] RE: [Spambayes] Question (or possibly a bug report)

Tim Peters tim.one@comcast.net
Wed, 23 Jul 2003 23:55:40 -0400


[Mark Hammond]
> ...
> Hrm - OK - I bit the bullet, and re-booted as German locale.  If I
> remove all calls to setlocale(), I can provoke come *very* strange
> math errors. Both:
>
> ...
> - and in the "training" dialog, I can reproduce the original bug:
>
>   File "E:\src\spambayes\Outlook2000\dialogs\AsyncDialog.py", line
> 45, in set_stages
>     assert (abs(start_pos-1.0)) < 0.001, \
> AssertionError: Proportions must add to 1.0 (1.0,(('', 1.0),))

That one is still baffling to me, for reasons explained in great detail
before (if none of the float literals in this file get screwed, *or* if all
of them get screwed by locale, this assert shouldn't fail -- locale has to
be screwing up some of the float literals but not others, and that
possibility remains baffling to me).  Note that I checked in a new version
of this assert that displays more info when it fails.