why doesn't this filter the warning?

Terry Carroll carroll at nospam-tjc.com
Mon Oct 18 03:56:50 CEST 2004


On Sun, 17 Oct 2004 20:35:54 -0500, Jeff Epler <jepler at unpythonic.net>
wrote:

>On Sun, Oct 17, 2004 at 06:18:06PM -0700, Terry Carroll wrote:
>> Why won't the filterwarnings call suppress this?
>
>The warning is produced at the time the code is *parsed*, not when it is
>*executed*.  You could suppress the warning in an imported module by
>putting the suppression above the import of the problem module, for
>instance.

Thanks!  

The problem code was actually: 

sum = sum & 0xffffffff 

Which was unnecessary, so I removed it, but I was curious why the
suppression technique, my first cut at fixing it (just in case I
misunderstood something) didn't work.



More information about the Python-list mailing list