A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-August/037825.html below:

[Python-Dev] pre-PEP: Resource-Release Support for Generators

[Python-Dev] pre-PEP: Resource-Release Support for Generators [Python-Dev] pre-PEP: Resource-Release Support for GeneratorsRonald Oussoren oussoren at cistron.nl
Wed Aug 27 00:36:02 EDT 2003
On Tuesday, 26 August 2003, at 22:50, Guido van Rossum wrote:

> Another comment on Samuele's PEP: It is sort of sad that the *user* of
> a generator has to know that the generator's close() must be called.
> Normally, the beauty of using a try/finally for cleanup is that your
> callers don't need to know about it.  But I see no way around this.

I have no idea what the issues are w.r.t. cleanup for generators, but 
wouldn't it be more natural to make sure that the finally clause would 
be executed when the generator is garbage collected?

Back to lurking,
	Ronald


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4