[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 Lee. (Merge 3.5->3.6)

changeset:   102541:b5403f416836
branch:  3.5
parent:  102539:42d84513c3f0
user:Guido van Rossum 
date:Fri Aug 05 12:56:09 2016 -0700
summary: Add typing.Generator docs, by Michael Lee.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Guido van Rossum

Changes by Guido van Rossum :


--
assignee: docs@python -> gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
severity: normal
status: open
title: Add documentation for typing.Generator
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44013/document-generators.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com