[Python-Dev] PEP 340 -- concept clarification
Nick Coghlan
ncoghlan at gmail.com
Wed May 4 13:58:29 CEST 2005
> At 05:17 PM 5/3/05 -0700, Guido van Rossum wrote:
>>But I kind of doubt that it's an issue; you'd have to have a
>>try/except catching StopIteration around a yield statement that
>>resumes the generator before this becomes an issue, and that sounds
>>extremely improbable.
The specific offending construct is:
yield itr.next()
Wrapping that in StopIteration can be quite convenient, and is probably too
common to ignore - Phillip's examples reminded me that some my _own_ code uses
this trick.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-Dev
mailing list