[prev in list] [next in list] [prev in thread] [next in thread]
List: python-dev
Subject: Re: [Python-Dev] PEP 340: Non-looping version (aka PEP 310 redux)
From: Toby Dickenson <tdickenson () devmail ! geminidataloggers ! co ! uk>
Date: 2005-05-06 10:20:31
Message-ID: 200505061120.31117.tdickenson () devmail ! geminidataloggers ! co ! uk
[Download RAW message or body]
On Thursday 05 May 2005 16:03, Nick Coghlan wrote:
> The discussion on the meaning of break when nesting a PEP 340 block
> statement inside a for loop has given me some real reasons to prefer PEP
> 310's single pass semantics for user defined statements
That also solves a problem with resource acquisition block generators that I
hadnt been able to articulate until now. What about resources whose lifetimes
are more complex than a lexical block, where you cant use a block statement?
It seems quite natural for code that want to manage its own resources to call
__enter__ and __exit__ directly. Thats not true of the block generator API.
--
Toby Dickenson
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev%40progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic