We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sys.flags.gil
sys.flags is a PyStructSequence. PyStructSequence is similar to a named tuple, but it can have attributes that are not part of the sequence.
sys.flags
PyStructSequence
Currently, sys.flags.gil is not a "sequence" attribute:
>>> import sys >>> sys.flags sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=0, warn_default_encoding=0, safe_path=False, int_max_str_digits=4300)
I think this was an oversight. We forgot to update the n_in_sequence field from 18 to 19 in gh-116338:
n_in_sequence
cpython/Python/sysmodule.c
Lines 3123 to 3128 in fda6bd8
Bug report
sys.flagsis aPyStructSequence.PyStructSequenceis similar to a named tuple, but it can have attributes that are not part of the sequence.Currently,
sys.flags.gilis not a "sequence" attribute:I think this was an oversight. We forgot to update the
n_in_sequencefield from 18 to 19 in gh-116338:cpython/Python/sysmodule.c
Lines 3123 to 3128 in fda6bd8
Linked PRs
sys.flags.gilas a sequence attribute #122576