Message307367
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. |
|
| Date |
User |
Action |
Args |
| 2017-12-01 07:18:25 | Kang | set | recipients:
+ Kang |
| 2017-12-01 07:18:25 | Kang | set | messageid: <1512112705.37.0.213398074469.issue32191@psf.upfronthosting.co.za> |
| 2017-12-01 07:18:25 | Kang | link | issue32191 messages |
| 2017-12-01 07:18:25 | Kang | create | |
|