yield_all needed in Python

Douglas Alan nessus at mit.edu
Tue Mar 1 17:33:33 EST 2005


David Eppstein <eppstein at ics.uci.edu> writes:

> In article <lcacpnxp8s.fsf at gaffa.mit.edu>,

>  Douglas Alan <nessus at mit.edu> wrote:

>> > Cetainly, if <yield_all
>> > iterator> == <for i in iterator: yield i>, I don't see how anything
>> > is gained except for a few keystrokes.

>> What's gained is making one's code more readable and maintainable,
>> which is the one of the primary reasons that I use Python.

> I don't see a lot of difference in readability and maintainability 
> between the two versions.

In that case, your brain works nothing like mine.

|>oug



More information about the Python-list mailing list