-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Description
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:
def func():
print(gen.gi_suspended, "func") # False func
yield 0
print(gen.gi_suspended, "func") # False func
yield 1
print(gen.gi_suspended, "func") # False func
yield 2
print(gen.gi_suspended, "func") # False func
gen = func()
print(gen.gi_suspended) # False
print(next(gen)) # 0
print(gen.gi_suspended) # True
print(next(gen)) # 1
print(gen.gi_suspended) # True
print(next(gen)) # 2
print(gen.gi_suspended) # True
print(next(gen)) # StopIteration:
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasytriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Projects
Status
Todo