[Types-sig] A lurker's comment

Tim Peters tim_one@email.msn.com
Fri, 17 Dec 1999 18:29:04 -0500


[lannert@lannert.rz.uni-duesseldorf.de]
> ....
> An assignment with lhs: (IntType,), rhs: (NoneType, IntType)
> should not be rejected by the interpreter if rhs happens to
> be an Int, but by the compiler.

??? If it's rejected by the compiler, the interpreter will never get to see
it.

See earlier msgs for disussion of "modes".  Some people will want a
compile-time error on that; others will want a runtime error iff rhs==None
obtains; others will want a compile-time warning but not a compile-time
error or runtime expense.

Does one of those cover your view of the world, or do you have a 4th idea in
mind?  Note that GregS's "!" operator gives another approach to cases like
this (explicit runtime check, spelled in a convenient way but on an
expression-by-expression bais).