A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-February/143229.html below:

[Python-Dev] Experiences with Creating PEP 484 Stub Files

[Python-Dev] Experiences with Creating PEP 484 Stub Files [Python-Dev] Experiences with Creating PEP 484 Stub FilesEthan Furman ethan at stoneleaf.us
Tue Feb 9 18:56:41 EST 2016
On 02/09/2016 03:48 PM, Guido van Rossum wrote:

 > (Assuming you meant Option*al*.) There seems to be an utter confusion
 > of the two uses of the term "optional" here. An "optional argument"
 > (outside PEP 484) is one that has a default value. The "Optional[T]"
 > notation in PEP 484 means "Union[T, None]". They mean different
 > things.

In an effort to be (crystal) clear:

option argument in Python: has a default value, so may be omitted when 
the function is called.

Optional[T] in MyPy: the argument has no default value, and must be 
supplied when the function is called, but the argument can be None.

--
~Ethan~
More information about the Python-Dev mailing list

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