[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If this is only a theoretical problem, might it make sense > to just leave it as is? I'm fine with that. In the last four years, I'm the only one who ever noticed, so it doesn't appear to be a problem in practice. -- resolution: -> wont fix

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-07 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue24413] Inconsistent behavior between set and dict_keys/dict_items: for non-iterable object x, set().__or__(x) returns NotImplemented, but {}.keys().__or__(x) raises TypeError

2019-08-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: To be clear, set().__or__(x) returns NotImplemented, it doesn't raise NotImplementedError. I've edited the title to match. One major problem that gets in the way of a fix is that the interface of set and dict views doesn't match, because dict views only