On Thu, Aug 29, 2019 at 7:14 PM Andrew Barnert <abarn...@yahoo.com> wrote:
> What about other constructs that take a tuple of types? Should try/except > take sets? (Are there any others?) > > Would anyone be surprised that isinstance/issubclass take a tuple or set > of types but all those string methods take only a tuple, not a set, of > strings? I think people would get over that quickly, thereād just be > another entry in the StackOverflow Python FAQ list. > Yeah, we could gradually fix those over time based on feedback. Note that `except (E1, E2)` has the same concern as `isinstance(x, (T1, T2))` that we need to be careful not to dive into infinite recursion. Also a caveat: I'm participating in this discussion but that doesn't mean this will all happen (soon, or ever). It takes a lot of work to implement such changes: even if Python itself doesn't have to be changed, we'd still need to implement it in mypy, Pyre, PyCharm, Pytype, and who knows what else. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him/his **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ 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/GMKRPD6EFLMN7KQYPXZ6OXALNLZCHMSU/ Code of Conduct: http://python.org/psf/codeofconduct/