How are exceptions actually implemented in assembly?
Michael Hudson
mwh at python.net
Wed Jan 23 12:23:19 EST 2002
"Jason Orendorff" <jason at jorendorff.com> writes:
> Some C implementations have weird features that provide some sort of
> exception-like behavior; also the C standard provides
> setjmp()/longjmp() which is vaguely similar. Python uses neither.
<pedant> Actually Python does use setjmp/longjmp somewhere in the
murky bowels of the interaction of readline and signals to generate
KeyboardInterrupt exceptions. </pedant> But you're basically right.
It struck me recently that most entrants to the obfuscated C
competition don't use setjmp/longjmp enough. I'd have thought you
could make something utterly incomprehensible with judicious use of
these functions.
Cheers,
M.
--
Unfortunately, nigh the whole world is now duped into thinking that
silly fill-in forms on web pages is the way to do user interfaces.
-- Erik Naggum, comp.lang.lisp
More information about the Python-list
mailing list