Chris Jerdonek added the comment:
Good suggestion, David. Here is such sample test code. It is adapted from the
sample code for ValueError: generator already executing included in PEP 255:
def test_gen(call_gen_method):
def gen():
call_gen_method(me)
yield 1
me =
Roundup Robot added the comment:
New changeset dc4b00f51c48 by R David Murray in branch '3.2':
#15355: Mention already-executing Exception in generator docs.
http://hg.python.org/cpython/rev/dc4b00f51c48
New changeset 73f1ba3319dd by R David Murray in branch 'default':
Merge #15355: Mention
R. David Murray added the comment:
Confirmed that 2.7 raises the same errors (as I expected) using your test.
Thanks, Chris.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
R. David Murray added the comment:
Chris, if Nick is too busy to reply right now and you want to move this along,
you could write some tests (not necessarily for inclusion in the test suite) to
confirm that the doc you are adding is correct. I don't know enough about
generators to comment
Chris Jerdonek added the comment:
Nick, would you be able to take a look at this minor documentation patch re:
generators? Would you prefer this blanket statement, or an explicit (possibly
repeated) statement inside the documentation of each method?
--
versions: +Python 2.7, Python
Chris Jerdonek added the comment:
Meador, does this language look okay to you now that it states the exception
type?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15355
___
Meador Inge added the comment:
Hi Chris, it seems reasonable to me, but I would feel more comfortable if
someone (like Nick) that is more familiar with the generator implementation can
comment on this as well.
--
___
Python tracker
Chris Jerdonek added the comment:
Hmmm, in your original description you say that the 'generator.__next__'
documentation should be changed, but in the patch the note applies to all
generator methods.
Thanks, Meador. Yes, I realized that later. Retitling now. I will also add
the