On Mon, Aug 1, 2022, at 09:19, Paul Moore wrote:
> There are a lot of complex cases you'd need to consider. What would the 
> value of range(3, 15, 2) + range(8, 12, 2) be? It's not a range in the 
> sense of being describable as (start, end, step). And simply saying 
> "that's not allowed" wouldn't really work, as it would be far too hard 
> to work with if operations could fail unexpectedly like this. In 
> reality, this feels more like you're after set algebra, which Python 
> already has.

Maybe it would make sense for the type of the result to devolve into a sorted 
set (do we have a sorted set type now?) if it's not representable as a range.
_______________________________________________
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/PKGCHWYKC5P27FTKZH5LGVQ5RCZMMXUS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to