A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-September/038074.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 GeneratorsArmin Rigo arigo at tunes.org
Tue Sep 16 06:50:04 EDT 2003
Hello Phillip,

On Mon, Sep 15, 2003 at 11:26:27AM -0400, Phillip J. Eby wrote:
> i = iter(something)
> while 1:
>     try:
>         j=i.next()
>     except StopIteration:
>         break
> 
> (...) is already complex enough as a mental model.

Makes sense. Then let's make sure, if both 'with' and 'yield within
try:finally' are accepted, that they are compatible, e.g. by having and
__exit__() method on generators (and not just a close()).


Armin


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