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
{{ message }}
Repository navigation
The explanation of gi_suspended should be added to Types and members #138966
Python doc doesn't have the explanation of gi_suspended to be used to check if the generator is currently suspended(paused) or not so it should be added to Types and members:
"""Get current state of a generator-iterator. Possible states are: GEN_CREATED: Waiting to start execution. GEN_RUNNING: Currently being executed by the interpreter. GEN_SUSPENDED: Currently suspended at a yield expression. GEN_CLOSED: Execution has completed. """
While @picnixz suggested using the phrasing from inspect.getgeneratorstate, I followed the more concise style of the directly related gi_running attribute "is the generator running?" for consistency within this table.
I believe this respects both the meaning from the original suggestion and the established style of the "Types and members" section.
If you have any other thoughts, please feel free to share. Thank you!
Activity
picnixz commentedon Sep 16, 2025
We should use the same words as those in the comment for https://docs.python.org/3/library/inspect.html#inspect.getgeneratorstate:
codenamenam commentedon Sep 17, 2025
I've submitted a pull request.
While @picnixz suggested using the phrasing from
inspect.getgeneratorstate, I followed the more concise style of the directly relatedgi_runningattribute "is the generator running?" for consistency within this table.I believe this respects both the meaning from the original suggestion and the established style of the "Types and members" section.
If you have any other thoughts, please feel free to share. Thank you!
gh-138966: Add description for `gi_suspended` attribute (GH-139008)
pythongh-138966: Add description for `gi_suspended` attribute (python…
pythongh-138966: Add description for `gi_suspended` attribute (python…
[3.13] gh-138966: Add description for `gi_suspended` attribute (GH-13…
[3.14] gh-138966: Add description for `gi_suspended` attribute (GH-13…