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
「其他文章」