"assert" annoyance

Miles semanticist at gmail.com
Fri Jun 22 08:34:09 CEST 2007


On Jun 22, 1:31 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> What I really want is for any assertion failure, anywhere in the
> program, to trap to the debugger WITHOUT blowing out of the scope
> where the failure happened, so I can examine the local frame.  That
> just seems natural, but I don't see an obvious way to do it.

You could run the entire program through pdb:
----
#!/usr/bin/env python -m pdb

print "Hello!"
assert False
print "...world!"
----




More information about the Python-list mailing list