Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

This is a bug dictviews_sub(). It that incorrectly calls difference_update() 
instead of set_isub() which would perform the requisite type check.  

Note the KeysView ABC is correct and implements the type check.

This situation is unfortunate.  Adding the type check will help prevent future 
bugs;  however, it will likely also break some existing code that is currently 
working correctly.

My recommendation is to leave it as-is and live with it.  That is what we did 
with list.iadd() which has the same problem.

----------
nosy: +rhettinger

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

Reply via email to