17.06.19 17:47, Guido van Rossum пише:
Indeed it would work the same way as set comparison does, if you interpret a type as the set of its instances.

But I imagine that many Python users are not so familiar with this abstraction level (even if they use isinstance() and issubclass() all day long). Sometimes using a *different* operator is helpful to send a signal to the reader that a *different* kind of thing is being manipulated -- sort of like how you can tell that a collection is a list or a set by noticing whether values are added using append() or add().

Type theorists apparently have chosen to use the <: notation, and presumably for the same reason.

Then perhaps we should start to use <: for sets and left < and <= for types that support full ordering.
_______________________________________________
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/ESNRRGBIHNVFMUJ3YK4RVZSVFXZQW47X/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to