Message396358
So this is a problem because the generator owns a resource that it will only release once its .close() method is called, right? And we have no control over when that happens -- we can't make it the responsibility of list() to close the iterator passed into it. It is indeed a painful thing. I wonder if we should put a warning somewhere in the docs and tutorials for generators?
The PR looks good. |
|
Date |
User |
Action |
Args |
2021-06-22 19:10:18 | gvanrossum | set | recipients:
+ gvanrossum, serhiy.storchaka |
2021-06-22 19:10:18 | gvanrossum | set | messageid: <1624389018.08.0.536335150978.issue44482@roundup.psfhosted.org> |
2021-06-22 19:10:18 | gvanrossum | link | issue44482 messages |
2021-06-22 19:10:18 | gvanrossum | create | |
|