Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes: >> There are better ways to handle errors than Python's exception system. > I'm curious -- what ways would they be? > I'm aware of three general exception handling techniques: ... > What else is there?
The Erlang approach is to chop the application into a lot of very lightweight processes, and let any process that encounters an error simply crash. A monitoring process notices the crashed process and restarts it. There is a "supervision tree" of uber-monitor processes that restart crashed monitor proceses. I haven't programmed in that style myself and I'm not persuaded that it's better than what Python does, but I think it's different from the stuff on your list, which is an answer to your "what else is there". I do know that they write some complex, very high reliability systems (phone switches) in Erlang. -- http://mail.python.org/mailman/listinfo/python-list