Yury Selivanov wrote:
I saying that the following should not work:

    def nested_gen():
        set_some_context()
        yield

    def gen():
       # some_context is not set
       yield from nested_gen()
       # use some_context ???

And I'm saying it *should* work, otherwise it breaks
one of the fundamental principles on which yield-from
is based, namely that 'yield from foo()' should behave
as far as possible as a generator equivalent of a
plain function call.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to