On Thu, Apr 24, 2008 at 2:01 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Thu, Apr 24, 2008 at 1:51 PM, Mikhail Glushenkov > > Why not make ``assert`` a built-in function then? > Because then it can't be disabled by the compiler in -O mode.
A reasonable conclusion, but needs better reasoning. One could certainly do an: assert_stmt ::= "assert" (expression ["," expression]) and implement it, when there isn't a -O, as: __assert__(expression, message=None) # built-in This gives: + more language consistency for developer using assert(). + over-ride assertion failure to log it correctly. + easier to decide not to throw exception during debugging. - might have security concerns. So, better reasoning? or just ISO? _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com