Python中exit()和sys.exit()之間的區別 - Difference between exit() and sys.exit() in Python

語言: CN / TW / HK

問題:

In Python, there are two similarly-named functions, exit() and sys.exit() . 在Python中,有兩個類似命名的函數, exit()sys.exit() What's the difference and when should I use one over the other? 有什麼區別,什麼時候應該使用一個而不是另一個?


解決方案:

參考一: http://stackoom.com/question/RHEn
參考二: Difference between exit() and sys.exit() in Python
「其他文章」