On 6/20/19 3:03 PM, David Mertz wrote:
On Wed, Jun 19, 2019, 7:35 PM Jeffrey Kintscher <websur...@surf2c.net
<mailto:websur...@surf2c.net>> wrote:
It is not at all intuitive that
issubclass(A, (B, C))
means "Is A a subclass of B or a subclass of C?" when it could
also mean "Is A a subclass of both B and C?".
I've used issubclass() maybe 20 times in more than 20 years
programming Python. I know the correct meaning.
But sure, I can imagine not knowing which of the two things you
mention is the meaning. Either could be useful. How many times would
you need to look it up?!
For folks who actually use issubclass() fairly often, that came be a
burden. For those of us who rarely use it, consulting the docs once a
year also isn't a burden.
This just doesn't warrant new syntax.
I agree that the implementation cost (i.e development, documentation,
and support) appears to outweigh the benefits. While I think the new
operators would make the logic easier to read, I haven't seen anything
in the discussions showing that developers would use it often enough to
justify the implementation cost.
//Jeff
--
-----------------------------------------
From there to here, from here to there,
funny things are everywhere.
-- Theodore Geisel
_______________________________________________
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/SZQRNH7DG47PKSVGLYRX4BQKQWGIWY4W/
Code of Conduct: http://python.org/psf/codeofconduct/