Portál AbcLinuxu, 2. listopadu 2025 10:27
from sys import exit exit(0)nebo
import sys sys.exit(0)nebo
raise SystemExit(0)
while True:
# tady nejaky kod
if cond: break
# tady dalsi kod
if cond: break
# tady posledni kus kodu
break
#endwhile
def init():
# kod
if cond: return
# kod
if cond: return
# kod
#enddef
init()
class ExitModule(Exception): pass try: ... nejaky kod ... # ukonceni modulu raise ExitModule ... nejaky kod ... except ExitModule: pass
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.