How do I disable warnings?

Grant Edwards grante at visi.com
Mon Sep 10 15:34:21 EDT 2007


I've read the documentation for the warnings module, but I'm
still unable to figure out how to disable a warning.

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?

-- 
Grant Edwards                   grante             Yow! And then we could sit
                                  at               on the hoods of cars at
                               visi.com            stop lights!



More information about the Python-list mailing list