Comparison with False - something I don't understand

John Nagle nagle at animats.com
Mon Dec 6 13:50:51 EST 2010


On 12/2/2010 10:09 AM, Paul Rubin wrote:
> MRAB<python at mrabarnett.plus.com>  writes:
>> When writing the C code for the new regex module I thought that it
>> would've been easier if I could've used exceptions to propagate errors
>> and unwind the stack, instead of having to return an error code which
>> had to be checked by the caller, and then have the caller explicitly
>> return an error code to /its/ caller.
>
> That's called longjmp.
>
>> Automatic garbage collection would also have been nice.
>
> alloca might help.

    If you want proper exception unwinding, use C++, which
has it.  "longjmp" is a hack from the PDP-11 era.

				John Nagle




More information about the Python-list mailing list