The python editor won't "get exit." It will raise an exception. With or without an eval, you can catch the exception.
try: x = 1/0 except ZeroDivisionError: x = "infinity" Jm lists wrote: > Hello members, > > I want to know does the "eval" in python have the same features as in > Perl (capture errors)? > > For example,in perl I can wrote: > > $re = eval { 1 / 0 }; > > Though 1/0 is a fatal error but since it's in "eval" block so the perl > interpreter doesn't get exit. > > Thanks again. -- http://mail.python.org/mailman/listinfo/python-list