[issue32191] TypeError does not work when function with type hint

2017-11-30 Thread Kyeongpil

New submission from Kyeongpil :

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.

--
components: ctypes
messages: 307367
nosy: Kang
priority: normal
severity: normal
status: open
title: TypeError does not work when function with type hint
type: behavior
versions: Python 3.6

___
Python tracker 
<https://bugs.python.org/issue32191>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32191] TypeError does not work when function with type hint

2017-11-30 Thread Kyeongpil

Kyeongpil  added the comment:

Oh, I confused the syntax of type hint.
Sorry

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue32191>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com