Skip to content

The explanation of gi_suspended should be added to Types and members#138966

@hyperkai

Description

@hyperkai

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:

deffunc(): print(gen.gi_suspended, "func") # False funcyield0print(gen.gi_suspended, "func") # False funcyield1print(gen.gi_suspended, "func") # False funcyield2print(gen.gi_suspended, "func") # False funcgen=func() print(gen.gi_suspended) # Falseprint(next(gen)) # 0print(gen.gi_suspended) # Trueprint(next(gen)) # 1print(gen.gi_suspended) # Trueprint(next(gen)) # 2print(gen.gi_suspended) # Trueprint(next(gen)) # StopIteration:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasytriagedThe issue has been accepted as valid by a triager.

    Projects

    Status

    Done

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions