0

My code look like this , it's not clear to me exit (0) and exit (other num). I give myself sometime but i didn't clear myself enough

from sys import exit
class Scene(object):
    def enter(self):
        print "This scene is not yet configured"
        exit(1)
Ivan Kolesnikov
  • 1,739
  • 1
  • 23
  • 43
squal
  • 175
  • 2
  • 13
  • It's the value returned by the program to the system. Usually, a value of 0 means "properly exited", and other values indicate a failure. –  May 29 '17 at 04:31
  • Hellow evert, you means it gives the error massage, right? – squal May 29 '17 at 04:35

1 Answers1

1

exit(0) means a clean exit without an error

exit(1) means there was an error and that is the reason for the exit

vinzee
  • 17,022
  • 14
  • 42
  • 60