On Thu, Oct 17, 2019 at 08:19:13AM -0000, Steve Jorgensen wrote:

> Why the need for strictness of type for the operator? I get that it's 
> analogous with the behavior for `list`, but I guess I'm also not sure 
> why that should be strict.

(1) Follow the precedent of existing operators.

(2) It is easier to relax restrictions later, than to add restrictions 
if the original behaviour turned out to be a mistake. So it is (usually) 
better to begin with the most conservative thing that will work and 
gradually allow more if and when needed.

(It is relatively easy to add functionality to the language, but very 
difficult to take it away.)


> Also, why was subtraction dropped? It seems to me the ability to 
> subtract an iterable of keys makes a lot of sense — or maybe that 
> should be a separate PEP?

In the initial discussion, the subtraction operator got very little 
attention. It isn't really fair to sneak in a second operator as part of 
a controversial proposal like this one.

If someone wishes to re-propose the subtraction operator, or the full 
suite of set-like operations (intersection, difference, symmetric 
difference, union) they are free to do so, either as an adjunct to, 
or a competitor of, this PEP.



-- 
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ND3MJSSWTVP5MO6YURVCG355ROW7VHJ2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to