New submission from Joshua Morton:
Following the comments in python ideas [1], I'm submitting a bug report. In
python 3, dictionary views (KeysView and ItemsView specifically) do not adhere
to the same interface as Sets. Specifically, the __and__, __or__, __xor__, and
__sub__ methods on Views will accept a non-set type (`{}.keys() | []`), while
the same throws a TypeError on a Set. The suggested, not-backwards-compatible
solution, was to have dictviews raise errors in the same way.
[1] https://mail.python.org/pipermail/python-ideas/2016-April/039469.html
----------
messages: 265110
nosy: Joshua Morton
priority: normal
severity: normal
status: open
title: Dict View binops permit non-set types
type: behavior
versions: Python 3.4, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com