Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 9, 2023

Source: https://github.com/python/cpython/blob/3.12/Objects/genobject.c#L1551

It is read-only:

>>> async def some():
...    yield 1
... 
>>> some()
<async_generator object some at 0x10559d300>
>>> some().ag_suspended
False
>>> some().ag_suspended = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: attribute 'ag_suspended' of 'async_generator' objects is not writable

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2023

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants