Nobody <nob...@nowhere.com> writes: > One feature which can't readily be implemented in C is the automatic > clean-up side of the RAII idiom.
I once did that by having an explicit stack of finalization records linked through the call stack. The "throw" routine would traverse the links to call the finalizers, until it found the matching "catch" which contained a longjmp target. It wasn't as crazy as this makes it sound. -- http://mail.python.org/mailman/listinfo/python-list