Serhiy Storchaka added the comment:
This is a consequence of duck-typing and is common in Python. If you pass a
value of wrong type, it is expected that you can get an AttributeError.
Explicit type checks clutter and slow down the code, and make it less flexible.
You can test an explicit type
New submission from Tilman Krummeck :
I found a problem by accident on Python 3.5.3 with the uuid library.
Running this:
from uuid import UUID
UUID(["string"])
This throws an AttributeError:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Tilman
Krummeck\AppData\Loc