This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vlad
Recipients vlad
Date 2018-03-14.13:25:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521033909.39.0.467229070634.issue33075@psf.upfronthosting.co.za>
In-reply-to
Content
from typing import *

def f(arg: str = None):
    pass
print(get_type_hints(f))

# {'arg': typing.Union[str, NoneType]}
# as expected


class T(NamedTuple):
    field: str = None
print(get_type_hints(T))

# {'field': <class 'str'>}
# but it should be
# {'field': typing.Union[str, NoneType]}
# for consistency
History
Date User Action Args
2018-03-14 13:25:09vladsetrecipients: + vlad
2018-03-14 13:25:09vladsetmessageid: <1521033909.39.0.467229070634.issue33075@psf.upfronthosting.co.za>
2018-03-14 13:25:09vladlinkissue33075 messages
2018-03-14 13:25:09vladcreate