| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…n_kind The assignment to generator_return_kind has to be after any potentially escaping calls or it might be overwritten.
| class CallGeneratorOnDealloc: | ||
| def __del__(self): | ||
| def gen(): | ||
| yield 1 | ||
| next(gen()) | ||
|
|
||
| async def coro(): | ||
| obj = CallGeneratorOnDealloc() | ||
| return 42 |
There was a problem hiding this comment.
A little bit smaller in size:
| class CallGeneratorOnDealloc: | |
| def __del__(self): | |
| def gen(): | |
| yield 1 | |
| next(gen()) | |
| async def coro(): | |
| obj = CallGeneratorOnDealloc() | |
| return 42 | |
| class CallGeneratorOnDealloc: | |
| def __del__(self): | |
| next(x for x in [42]) | |
| async def coro(): | |
| obj = CallGeneratorOnDealloc() |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
…rn_kind` (pythongh-143951) The assignment to generator_return_kind has to be after any potentially escaping calls to ensure that it's not overwritten.
| Back | FazBrowse Home | New Git URL |
The assignment to generator_return_kind must be after any potentially escaping calls to ensure that it's not overwritten.