This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients gvanrossum, serhiy.storchaka
Date 2021-06-22.19:10:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:18gvanrossumsetrecipients: + gvanrossum, serhiy.storchaka
2021-06-22 19:10:18gvanrossumsetmessageid: <>
2021-06-22 19:10:18gvanrossumlinkissue44482 messages
2021-06-22 19:10:18gvanrossumcreate