[issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int"

Alexander Belopolsky report at bugs.python.org
Fri Apr 24 02:23:33 CEST 2015


Alexander Belopolsky added the comment:

Passing anything other than one of the os.EX_* constants to sys.exit() is a bad idea.  In most cases you can get away with 0 and ±1.  Anything beyond 8 bit signed range is a gamble.  Passing a computed integer value is even more problematic.  With the current behavior, you at least get some diagnostic when a computed long finds its way to sys.axit().  With the proposed patch these errors will pass silently.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14376>
_______________________________________


More information about the Python-bugs-list mailing list