Issue 27689: Add documentation for typing.Generator (original) (raw)

Created on 2016-08-05 04:09 by michael0x2a, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
document-generators.patch michael0x2a,2016-08-05 04:08 review
document-generators-v2.patch michael0x2a,2016-08-05 18:08 review
document-generators-v3.patch michael0x2a,2016-08-05 19:38 review
Messages (6)
msg272010 - (view) Author: Michael Lee (michael0x2a) * Date: 2016-08-05 04:08
This patch adds (previously missing) documentation for `typing.Generator`.
msg272039 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-08-05 16:18
Patch LGTM. I'll apply and merge once your other patches are final.
msg272040 - (view) Author: Ivan Levkivskyi (levkivskyi) * (Python committer) Date: 2016-08-05 16:22
Michael, thank you for the patch. I have only one comment. Generator is one of the few types in typing.py that behaves contravariantly. Maybe you could emphasize that it is contravariant in send type in your patch?
msg272049 - (view) Author: Michael Lee (michael0x2a) * Date: 2016-08-05 18:08
Revision two -- I added a brief note mentioning that SendType is contravariant, as Ivan suggested.
msg272052 - (view) Author: Michael Lee (michael0x2a) * Date: 2016-08-05 19:38
Revision 3 -- I changed the protocol for the example so that you stop the generator by sending in a negative number as a sentinel rather then None.
msg272055 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-08-05 19:58
changeset: 102542:f10029fea6ee tag: tip parent: 102540:fe189b8bd3ab parent: 102541:b5403f416836 user: Guido van Rossum <guido@dropbox.com> date: Fri Aug 05 12:57:38 2016 -0700 summary: Add typing.Generator docs, by Michael Lee. (Merge 3.5->3.6) changeset: 102541:b5403f416836 branch: 3.5 parent: 102539:42d84513c3f0 user: Guido van Rossum <guido@python.org> date: Fri Aug 05 12:56:09 2016 -0700 summary: Add typing.Generator docs, by Michael Lee.
History
Date User Action Args
2022-04-11 14:58:34 admin set github: 71876
2016-08-05 19:58:33 gvanrossum set status: open -> closedresolution: fixedmessages: +
2016-08-05 19:38:19 michael0x2a set files: + document-generators-v3.patchmessages: +
2016-08-05 18:08:40 michael0x2a set files: + document-generators-v2.patchmessages: +
2016-08-05 16:22:45 levkivskyi set nosy: + levkivskyimessages: +
2016-08-05 16🔞42 gvanrossum set assignee: docs@python -> gvanrossum
2016-08-05 16🔞31 gvanrossum set messages: +
2016-08-05 04:09:00 michael0x2a create