[Python-Dev] PEP 340 -- loose ends

Nick Coghlan ncoghlan at gmail.com
Thu May 5 13:00:59 CEST 2005


Shane Holloway (IEEE) wrote:
> It might actually be workable in the transaction scenario, as well as 
> others.  I'm not sure if I love or hate the idea though.

Given that this is officially a violation of the iterator protocol. . . (check 
the docs for well-behaved iterators)

> Another thing.  In the specification of the Anonymous Block function, is 
> there a reason that "itr = EXPR1" instead of "itr = iter(EXPR1)"?  It 
> seems to be a dis-symmetry with the 'for' loop specification.

Indeed - and a deliberate one, at least partly to discourage caching of block 
iterators.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net


More information about the Python-Dev mailing list