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 Kang
Recipients Kang
Date 2017-12-01.07:18:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512112705.37.0.213398074469.issue32191@psf.upfronthosting.co.za>
In-reply-to
Content
TypeError does not work when I input float variable into function that I give type hint.

example code is like this:
def a(b: int) -> int:
    return b+1

a(1.1)

and the result is 1.1.
However, I think it should throw TypeError Exception because type of input is float, not int.
History
Date User Action Args
2017-12-01 07:18:25Kangsetrecipients: + Kang
2017-12-01 07:18:25Kangsetmessageid: <1512112705.37.0.213398074469.issue32191@psf.upfronthosting.co.za>
2017-12-01 07:18:25Kanglinkissue32191 messages
2017-12-01 07:18:25Kangcreate