A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/mypy/issues/4221 below:

Make the 2 last parameters for typing.Generator optional · Issue #4221 · python/mypy · GitHub

If I use:

Generator[int]

mypy complains:

error: "Generator" expects 3 type arguments, but 1 given

I can silence mypy by doing:

Generator[int, None, None]

But given that the majority of generators just yield, rarely return or send, I think it would make sense to allow the last 2 parameters to have a default value of None.

YodaEmbedding, zeth, keith-hall-vmp, haakonvt, david-shiko and 1 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4