New submission from Sebastian Rittau <srit...@rittau.biz>:

Currently typing.Generator requires three arguments: Generator[YieldType, 
SendType, ReturnType].

At least for me, passing values to a generator is a very rare case. I suggest 
to allow only one argument to be passed to Generator: Generator[YieldType], 
where the other arguments default to None. This makes the common case more 
readable and is less error-prone. (I always forget the second and third 
argument, since that use case is so uncommon for me.)

----------
messages: 303748
nosy: srittau
priority: normal
severity: normal
status: open
title: one-argument version for Generator.typing
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to