Message165476
| Author |
chris.jerdonek |
| Recipients |
chris.jerdonek, docs@python |
| Date |
2012年07月15日.00:30:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月15日 00:31:01 | chris.jerdonek | set | recipients:
+ chris.jerdonek, docs@python |
| 2012年07月15日 00:31:01 | chris.jerdonek | set | messageid: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> |
| 2012年07月15日 00:31:00 | chris.jerdonek | link | issue15355 messages |
| 2012年07月15日 00:30:59 | chris.jerdonek | create |
|