[Python-3000] Assert syntax change...
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 25 01:30:56 CEST 2008
Charles Merriam wrote:
> It would be great to change assert from:
> assert_stmt ::= "assert" expression ["," expression]
> To:
> assert_stmt ::= "assert" expression ["as" expression]
I don't think "as" is the right word to use here...
maybe
assert <condition> else <expr>
> That is, would
> assert "tuple","implied" as "Message"
> or
> assert neverHappen > 0, "Programmer used 2.5 syntax here"
> be valid statements?
I think they should be invalid. I can't see a use case
for this -- the resulting condition would always be true.
--
Greg
More information about the Python-3000
mailing list