A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/118628.html below:

[Python-Dev] Change to yield-from implementation

[Python-Dev] Change to yield-from implementation [Python-Dev] Change to yield-from implementationGuido van Rossum guido at python.org
Mon Apr 9 16:57:05 CEST 2012
On Mon, Apr 9, 2012 at 5:46 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Tue, 10 Apr 2012 00:24:07 +1200
> Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>> Mark Shannon wrote:
>>
>> > We have recently removed the f_yieldfrom field from the frame object.
>> > (http://bugs.python.org/issue14230)
>>
>> Hey, wait a minute. Did anyone consider the performance effect
>> of that change on deeply nested yield-froms?
>
> What's the point? Apart from naïve toy examples of traversing trees, I
> don't think "deeply nested yield-froms" are likely to be
> performance-critical.

I agree with Benjamin that correctness trumps performance, but I'd
also like to point out that there are other use cases besides nested
iterators. If this gets used for coroutines it may not be so unusual
to have a stack of nested things with on top one that loops a lot --
if each iteration incurs cost proportional to how it got there this
may be a problem. But, correctness first.

-- 
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4