This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Stepan.Wagner
Recipients Stepan.Wagner
Date 2012-12-04.19:46:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354650360.2.0.9530636235.issue16610@psf.upfronthosting.co.za>
In-reply-to
Content
def emptygen():
    # Or other more meaningful generator
    raise StopIteration
    yield

def wrap(gen):
    next(gen)
    print("This should be printed or StopIteration raised.")
    while True:
        try:
            yield next(gen)
        except StopIteration as exc:
            return

items = wrap(emptygen())
for item in items:
    print(item)

print("End.")
History
Date User Action Args
2012-12-04 19:46:00Stepan.Wagnersetrecipients: + Stepan.Wagner
2012-12-04 19:46:00Stepan.Wagnersetmessageid: <1354650360.2.0.9530636235.issue16610@psf.upfronthosting.co.za>
2012-12-04 19:46:00Stepan.Wagnerlinkissue16610 messages
2012-12-04 19:46:00Stepan.Wagnercreate