Zbyszek Szmek <zbys...@in.waw.pl> added the comment:

Updated doc patch 0001-2.diff: following ncoghlan's request, the bulk of yield 
documentation is kept in expressions.rst, and simple_stmts.rst mostly refers to 
the other one. (In previous version it was the other way around).

After doing this change, I still think that it is better to have most of the 
documentation in the _statement_ part, and keep the _expression_ part 
relatively simple. The reason is that yield does more than just return a value, 
but also throws exceptions, suspends execution, etc. This is detached from the 
fact that is can be used in an expression.

Unfortunately yield as an expression is the only case where a statement can be 
used in an expression. Therefore there aren't any other cases which could be 
used as a guide.

----------
Added file: http://bugs.python.org/file23759/0001-2.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11682>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to