[Python-ideas] Optional static typing -- the crossroads
Petr Viktorin
encukou at gmail.com
Fri Aug 15 17:42:05 CEST 2014
On Fri, Aug 15, 2014 at 9:48 AM, Łukasz Langa <lukasz at langa.pl> wrote:
...
> As a side note, I’m happy you’re willing to agree on str | None. This reads
> really well and is concise enough to not require aliasing to be usable.
The common use is not all that concise:
def foo(bar: int | None=None): pass
Or alternatively it could be:
def foo(bar: int=None): pass
if the default was automatically allowed.
Also... Does None magically mean NoneType in type definitions?
More information about the Python-ideas
mailing list