How do I disable warnings?

Grant Edwards grante at visi.com
Mon Sep 10 17:01:09 EDT 2007


On 2007-09-10, attn.steven.kuo at gmail.com <attn.steven.kuo at gmail.com> wrote:

>> I'd like to disable this warning:
>>
>>  Warning: 'with' will become a reserved keyword in Python 2.6
>>
>> AFAICT, the following should work.  But, it doesn't.
>>
>>   import warnings
>>   warnings.filterwarnings('ignore',".*'with' will become a reserved keyword.*")
>>
>> What am I doing wrong?
>
> That looks to be a compile-time warning.

Doh! Of course it's a compile-time warning.

> Refer to a previous discussion here:
>
>     http://groups.google.com/group/comp.lang.python/msg/9f604b477ad31ef3

Thanks.

-- 
Grant Edwards                   grante             Yow! The Osmonds!  You are
                                  at               all Osmonds!!  Throwing up
                               visi.com            on a freeway at dawn!!!



More information about the Python-list mailing list