[docs] generator.throw() documentation inaccurate (issue 14911)

yselivanov.ml at gmail.com yselivanov.ml at gmail.com
Mon Feb 3 18:30:09 CET 2014


I'm not sure we need an example for this. At least not in its current
form.


http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst
File Doc/reference/expressions.rst (right):

http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst#newcode451
Doc/reference/expressions.rst:451: generator.send(foo())
Actually, I have a question: did you mean something like:

try:
   result = foo()
except Exception as ex:
   generator.throw(ex.with_traceback(None))
else:
   generator.send(result)

?

http://bugs.python.org/review/14911/


More information about the docs mailing list