In <zxr3m.613$p5...@nwrddc02.gnilink.net> Alan G Isaac <alan.is...@gmail.com> writes:
>> In <mgo3m.591$p5...@nwrddc02.gnilink.net> Alan G Isaac >> <alan.is...@gmail.com> writes: >>> 1. Don't use assertions to test argument values! >On 7/3/2009 12:19 PM kj apparently wrote: >> Out of curiosity, where does this come from? >http://docs.python.org/reference/simple_stmts.html#grammar-token-assert_stmt >"The current code generator emits no code for an assert statement when >optimization is requested at compile time." Sorry, this doesn't say anything like "don't use assertions to test argument values". I'm aware of the fact that assertions are silenced under certain circumstances. But where does the principle 1. in your first reply come from? I've never seen it before, and would like to understand the reasoning behind it. kj -- http://mail.python.org/mailman/listinfo/python-list