[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-11-22 Thread Julien Palard
Julien Palard added the comment: Let's start slowly by warning when a non-set is given to the __or__ of dictview? I think it is just a side effect of the current implementation, not a feature. -- ___ Python tracker

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-28 Thread Inada Naoki
Inada Naoki added the comment: > but it's not that simple as the __or__ of dictviews is less strict that the > __or__ of set: __or__ of dictview accept any iterable, __or__ of set only > accepts sets. I want to make it same to set. But it is a backward incompatible... --

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-22 Thread Julien Palard
Julien Palard added the comment: > It is not strange since dict.keys() in Python 2.7 returns list. Oh, ok thanks :) Do you think that it should be fixed? As it works with sets, I think so: >>> set() | Ror() set() but it's not that simple as the __or__ of dictviews is less strict that the

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-21 Thread Inada Naoki
Inada Naoki added the comment: > Strangely enough, it worked in Python 2.7 It is not strange since dict.keys() in Python 2.7 returns list. >>> {}.viewkeys() | Ror() Traceback (most recent call last): File "", line 1, in TypeError: iteration over non-sequence --

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38538] dictobject dictviews don't return NotImplemented for unrecognized types.

2019-10-20 Thread Julien Palard
New submission from Julien Palard : In the following snippet: >>> class Ror: ... def __ror__(self, other): ... return set() ... >>> {}.keys() | Ror() Traceback (most recent call last): File "", line 1, in TypeError: 'Ror' object is not iterable I