On Thu, Aug 29, 2019 at 06:20:55PM +0100, Rob Cliffe via Python-ideas wrote:

> >isinstance(x, str | int) ==> "is x an instance of str or int"
>
> Er, is that necessary when you can already write
> isinstance(x, (str, int))

It's not *necessary* it's just nicer.


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

Reply via email to