You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/library/sys.rst
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -975,6 +975,30 @@ always available.
975
975
module for informational purposes; modifying this value has no effect on the
976
976
registry keys used by Python. Availability: Windows.
977
977
978
+
979
+
.. data:: _xoptions
980
+
981
+
A dictionary of the various implementation-specific flags passed through
982
+
the :option:`-X` command-line option. Option names are either mapped to
983
+
their values, if given explicitly, or to :const:`True`. Example::
984
+
985
+
$ ./python -Xa=b -Xc
986
+
Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50)
987
+
[GCC 4.4.3] on linux2
988
+
Type "help", "copyright", "credits" or "license" for more information.
989
+
>>> import sys
990
+
>>> sys._xoptions
991
+
{'a': 'b', 'c': True}
992
+
993
+
.. impl-detail::
994
+
995
+
This is a CPython-specific way of accessing options passed through
996
+
:option:`-X`. Other implementations may export them through other
997
+
means, or not at all.
998
+
999
+
.. versionadded:: 3.2
1000
+
1001
+
978
1002
.. rubric:: Citations
979
1003
980
1004
.. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of this standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf .
0 commit comments