[Tutor] Control flow

Alan Gauld alan.gauld at freenet.co.uk
Fri Jan 28 23:12:44 CET 2005


> One way out of the top level is to call
> sys.exit(1)

Which works, but you need to import sys first.

Using

raise SystemExit

avoids the need for an import.

Alan G.




More information about the Tutor mailing list