On 2014-11-11 11:40, Peter Cacioppi wrote: > I get the impression that most Pythonistas aren't as habituated > with assert statements as I am. Is that just a misimpression on my > part?
I tend to use it to catch my bone-headedness rather than actual tests. I'm particularly fond of one that catches me typing "obj.exceptions" rather than "obj.exemptions" (both are common and occasionally interchangeable terms in $DAYJOB) something along the lines of assert hasattr(obj, "exceptions"), "idiot programmer" -tkc -- https://mail.python.org/mailman/listinfo/python-list