[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: changeset: 102542:f10029fea6ee tag: tip parent: 102540:fe189b8bd3ab parent: 102541:b5403f416836 user:Guido van Rossum date:Fri Aug 05 12:57:38 2016 -0700 summary: Add typing.Generator docs, by Michael

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Michael Lee
Michael Lee added the comment: 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. -- Added file: http://bugs.python.org/file44027/document-generators-v3.patch

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Michael Lee
Michael Lee added the comment: Revision two -- I added a brief note mentioning that SendType is contravariant, as Ivan suggested. -- Added file: http://bugs.python.org/file44026/document-generators-v2.patch ___ Python tracker

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: 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? -- nosy: +levkivskyi

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: docs@python -> gvanrossum ___ Python tracker ___

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: Patch LGTM. I'll apply and merge once your other patches are final. -- ___ Python tracker ___

[issue27689] Add documentation for typing.Generator

2016-08-04 Thread Michael Lee
New submission from Michael Lee: This patch adds (previously missing) documentation for `typing.Generator`. -- assignee: docs@python components: Documentation files: document-generators.patch keywords: patch messages: 272010 nosy: docs@python, gvanrossum, michael0x2a priority: normal