Help with syntax warnings

Robert Kern rkern at
Fri Sep 30 04:51:00 CEST 2005

Peter Hansen wrote:
> Ivan Shevanski wrote:
>>Here's a noob question for everyone (I'm not sure if my first message 
>>got through, is had a "suspicious header" so sorry for double post is 
>>so), is there a way to turn off syntax warnings or just make them not 
> Not sure... what's a "syntax warning"?
> Python has SyntaxError exceptions, which are raised during compilation 
> when a program can't even be compiled.  They're definitely not warnings, 
> and making them invisible would generally be pointless, yet even so all 
> you would have to do is catch them and ignore them if that's what you 
> wanted to do.  But did you mean SyntaxError, or something else?

In [1]: SyntaxWarning?
Type:           classobj
String Form:    exceptions.SyntaxWarning
Namespace:      Python builtin
    Base class for warnings about dubious syntax.

Robert Kern
rkern at

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the Python-list mailing list