Armin Ronacher wrote:

basestring is not subclassable for example.  Also it requires subclassing
which ABCs do not.

The use case that was cited was recognising subclasses of
UserString, and that's what I was responding to. If
basestring were made subclassable and UserString inherited
from it, that use case would be covered.

Recognising string-like objects *without* requiring
subclassing is a hopeless morass to get into, in my
opinion. You'll just have endless arguments about which
of the zillion methods of str should be in the blessed
set which confers string-ness.

I also think that the ABC idea in general suffers from
that problem, to one degree or another depending on
the class involved. Strings are just an extreme case.

--
Greg

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to