Proposal: runtime validation statement

Christopher T King squirrel at WPI.EDU
Mon Jul 12 15:02:09 EDT 2004


On Mon, 12 Jul 2004, Dave Brueck wrote:

> I disagree - there's a clear distinction between solving the problem and 
> e.g. validating inputs to the problem solver, and having such checks as 
> a statement is a good way to implement that distinction. That's why 
> 'assert' as a statement makes sense to me too - it and validate are sort 
> of "out of band" with getting the actual work done, but useful nonetheless.

I like to think 'print' falls into this same "out of band" category --
assuming it's used for debug purposes. Perhaps 'print' should be
deprecated for 'normal' uses (i.e. file IO, user interaction) in favor of
file IO operators (what one should hope any more than trivial program uses
anyways), and, in some future Python, tossed away in optimized bytecode
(much like assert statements).




More information about the Python-list mailing list