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/2005-May/053521.html below:

Deterministic Finalisation (new PEP draft, either a competitor or update to PEP 340)

[Python-Dev] PEP 340: Deterministic Finalisation (new PEP draft, either a competitor or update to PEP 340) [Python-Dev] PEP 340: Deterministic Finalisation (new PEP draft, either a competitor or update to PEP 340)Eric Nieuwland eric.nieuwland at xs4all.nl
Sat May 7 22:36:01 CEST 2005
Nick Coghlan wrote:

> [...]
> The whole PEP draft can be found here:
> http://members.iinet.net.au/~ncoghlan/public/pep-3XX.html
> [...]
> Used as follows::
>
>          for del auto_retry(3, IOError):
>              f = urllib.urlopen("http://python.org/")
>              print f.read()

I don't know. Using 'del' in that place seems ackward to me.
Why not use the following rule:
	for [VAR in] EXPR:
		SUITE
If EXPR is an iterator, no finalisation is done.
If EXPR is not an iterator, it is created at the start and destroyed at 
the end of the loop.

--eric

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