On Fri, Aug 30, 2019 at 7:59 AM Andrew Barnert <abarn...@yahoo.com> wrote:
>
> On Aug 29, 2019, at 12:54, Chris Angelico <ros...@gmail.com> wrote:
>
> >> Either one seems a lot better than breaking backward compatibility by 
> >> adding new operator methods to the type type.
> >>
> >
> > How does that break backward compat?
>
> It doesn’t make Python backward incompatible; it does mean that if typing or 
> mypy relies on it, it becomes incompatible with earlier versions of Python 
> (or has to fork different code for 3.8+ that relies on type.__or__ being 
> available and 3.7- that doesn’t have whatever functionality relies on that).
>

Ohh, gotcha. I'd describe that not as breaking backward compatibility
but as breaking the backport (in that typing.py can easily be
backported but core types can't). Still, I think it would be a
valuable enhancement, even if it can't be depended upon for older
versions - anything needing compatibility can have identical
functionality with the longer spelling.

ChrisA
_______________________________________________
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/IVJX7CGQMNAYHQUJ2CZUJ6SBFOLFKYWD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to