On Tue, Sep 03, 2019 at 12:19:15PM -0700, Andrew Barnert via Python-ideas wrote:
> On Sep 2, 2019, at 23:50, Philippe Prados <pyt...@prados.fr> wrote:
> > 
> > Add a new operator for `Union[type1|type2]` ?
> 
> Hold on. Are you proposing `Union[t1 | t2]` as a new spelling for 
> `Union[t1, t2]`? That seems pointless. I thought you were proposing 
> just `t1 | t2`, which seems a whole lot more useful (and no more 
> disruptive)?
> 
> I’m going to assume this is just a typo?

I too assume it was a typo, but for the record, since Union already 
flattens nested Unions, Union[str|int] would be equivalent to 
Union[Union[str|int]] which flattens to just str|int.


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

Reply via email to