[Python-Dev] [Python-checkins] cpython (3.3): Add -b and -X options to python man page.
Victor Stinner
victor.stinner at gmail.com
Tue Jun 25 00:28:09 CEST 2013
2013/6/24 R. David Murray <rdmurray at bitdance.com>:
> There is one. -X faulthandler. I'm sure others would agree about
> -O, but that long predates -X.
FYI I didn't chose "-X" because it is specific to CPython, but just
because it becomes really hard to choose a random letter to add a new
option... I prefer long options, but Python only supports the long
option --help. IMO "python -X faulthandler" is more explicit than
"python -@" (or "python -f", or any other random letter).
If you didn't know, you can also write "python -X faulthandler=1", it
does also enable faulthandler... As "python -X faulthandler=0" and
"python -X faulthandler=False" :-) (PHP style!)
> So, the idea is that -X *can* be used by other implementations for their
> own purposes, but there is certainly no requirement that they do so.
> Our promise is that anything CPython uses it for is something we don't
> expect other implementations to support.
It would be nice to have faulthandler or something similar (dump
traces on a crash) in other Python implementations :-) faulthandler
implementation is very specific to CPython. It uses internal
structures and low-level OS features like signal handler and a
specific stack for its signal handler. It is better to have it
integrated directly into CPython. (But it is also available as a third
party module for older versions.)
Victor
More information about the Python-Dev
mailing list