Op 2005-03-01, Steve Holden schreef <[EMAIL PROTECTED]>: > Terry Reedy wrote: >> "Douglas Alan" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> We can shorten the code--and make it run in O(N) time--by adding a >>>new >>> keyword to replace the "for v in ...: yield v" pattern: >> >> >> Maybe. Until you define the semantics of yield_all and at least outline an >> implementation, I am not convinced of 'run in o(n) time'. There was once a >> several-post discussion of a related idea of having yield somehow, >> magically, skip intermediate generators that only yielded value on up, >> without tranformation. But it was never clear how to do this practically >> without negatively impacting all generators. Cetainly, if <yield_all >> iterator> == <for i in iterator: yield i>, I don't see how anything is >> gained except for a few keystrokes. If <yield_all iterator> == <yield >> list(i for i in iterator)> then the replacement is a semantic change. >> > La plus ca change, la plus c'est la meme chose (I trust native French > speakers will excuse the laziness that led to the absence of accent).
Small diversion: You weren't lazy enough because you added words. The idiom AFAIK is: Plus ça change, plus ça reste la même chose. You shouldn't add the "la", I think that came from translating too literally, adding an article to a comparative in french turns it into a superlative. So instead of writing: The more it changes, the more is stays the same You wrote something like: Most it changes, most it is the same thing. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list