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 gvanrossum
Recipients gvanrossum, levkivskyi, tkomiya
Date 2020-11-08.22:07:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604873254.46.0.367789942688.issue42288@roundup.psfhosted.org>
In-reply-to
Content
There is actually a difference between Any and Optional[Any]. Try the following using e.g. mypy:

def f(a: Optional[Any]):
    a+1

def g(a: Any):
    a+1

You'll get an error in f but not in g.

So this behavior is not a bug.
History
Date User Action Args
2020-11-08 22:07:34gvanrossumsetrecipients: + gvanrossum, levkivskyi, tkomiya
2020-11-08 22:07:34gvanrossumsetmessageid: <1604873254.46.0.367789942688.issue42288@roundup.psfhosted.org>
2020-11-08 22:07:34gvanrossumlinkissue42288 messages
2020-11-08 22:07:34gvanrossumcreate