[docs] [issue15355] generator.__next__() docs should mention exception if already executing
Chris Jerdonek
report at bugs.python.org
Sun Jul 15 02:31:01 CEST 2012
New submission from Chris Jerdonek <chris.jerdonek at gmail.com>:
I think the generator.__next__() documentation should say that it raises an exception if the generator is already executing:
http://docs.python.org/dev/reference/expressions.html#generator.__next__
I don't think this is currently mentioned anywhere in the section on yield expressions.
I think this is worth mentioning because this is different from the general situation for iterators, for example. One consequence of this is that, unlike for iterators, using a bare generator in a multithreaded situation will always result in a critical section (since an iterator can be made to take care of its own locking, etc).
----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 165476
nosy: cjerdonek, docs at python
priority: normal
severity: normal
status: open
title: generator.__next__() docs should mention exception if already executing
versions: Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15355>
_______________________________________
More information about the docs
mailing list