Re: Help with syntax warnings
- From: "Fredrik Lundh" <fredrik@xxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 16:08:21 +0200
Peter Hansen wrote:
> Wow... Python detects "dubious syntax"? And here I thought programming
> was rather black and white, it's right or it's wrong.
SyntaxWarnings are issued for things that has never been valid nor well-
defined nor especially clever, but has been handled (in some more or less
reasonable way) by the CPython compiler. In practice, syntax warnings
will turn into errors in future releases.
> (He notes examples such as assigning to None and "unqualified exec is
> not allowed in function" etc.)
Compare and contrast:
Python 2.3.4 (#53, May 25 2004, 21:17:02)
>>> None = "hello"
<stdin>:1: SyntaxWarning: assignment to None
Python 2.4.1 (#65, Mar 30 2005, 09:13:57)
>>> None = "hello"
SyntaxError: assignment to None
</F>
.
- References:
- Help with syntax warnings
- From: Ivan Shevanski
- Re: Help with syntax warnings
- From: Peter Hansen
- Help with syntax warnings
- Prev by Date: Google Not Universal Panacea [was: Re: Where to find python c-sources]
- Next by Date: Re: Overloading & Overriden
- Previous by thread: Re: Help with syntax warnings
- Next by thread: Re: Help with syntax warnings
- Index(es):
Relevant Pages
|