This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add documentation for typing.Generator
Type: Stage:
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: docs@python, gvanrossum, levkivskyi, michael0x2a
Priority: normal Keywords: patch

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:34adminsetgithub: 71876
2016-08-05 19:58:33gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg272055
2016-08-05 19:38:19michael0x2asetfiles: + document-generators-v3.patch

messages: + msg272052
2016-08-05 18:08:40michael0x2asetfiles: + document-generators-v2.patch

messages: + msg272049
2016-08-05 16:22:45levkivskyisetnosy: + levkivskyi
messages: + msg272040
2016-08-05 16:18:42gvanrossumsetassignee: docs@python -> gvanrossum
2016-08-05 16:18:31gvanrossumsetmessages: + msg272039
2016-08-05 04:09:00michael0x2acreate