With my implementation, I can check assert int | None == None | int is true
Le lun. 2 sept. 2019 à 13:32, Ivan Levkivskyi <[email protected]> a écrit : > On Thu, 29 Aug 2019 at 23:48, Guido van Rossum <[email protected]> wrote: > >> On Thu, Aug 29, 2019 at 3:33 PM Chris Angelico <[email protected]> wrote: >> >>> On Fri, Aug 30, 2019 at 8:28 AM Guido van Rossum <[email protected]> >>> wrote: >> >> [...] >> >> >> I do tink we should probably review PEP 585 before doing anything about >> unions specifically -- likely there are bigger fish to fry. (And PEP 585 >> has not received much discussion.) >> > > I also agree with this. Generally I am fine with Union[int, str] and > Optional[int], but I also see how some people might want a shorter > notation. Many things around typing have been previously > rejected because we didn't want to introduce any (or at least minimal) > changes to the syntax and runtime, but now that typing is much more widely > used we can reconsider some of these. > Importantly, I think this should be done in a systematic way (potentially > using PEP 585 draft as a starting point). > > -- > Ivan > > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/YZHAERD5T4TZL62A6EI4BCKKAQYNJGSU/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/IFHQPZWZB5TLNHMMYM7I22LUCVCBGLVS/ Code of Conduct: http://python.org/psf/codeofconduct/
