Jean-Michel Pichavant a écrit :
(snip)
I personally never use asserts in python, cause I will end up handling with asserts what I should in fact handle properly in what you call the production code.

Not the same concern. Assertions are here for 1/ documention of expected state / value / pre|post conditions etc, and 2/ automatic verification of these expectations *during development* - so you can immediatly spot and fix failed expectations. IOW, it's about the "this should not, no way, never possibly happen" cases, not the "this may eventually happen" ones - which indeed require "proper" handling at the level you expect them.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to