Serhiy Storchaka <storchaka+cpyt...@gmail.com> 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 before calling uuid.UUID() in your code if you 
need.

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31888>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to