2008/6/1 Guido van Rossum <[EMAIL PROTECTED]>: >> The case for String has already been made. > > Actually I'm not sure. One you know that isinstance(x, String) is > true, what can you assume you can do with x? [...] > Right. I'm now beginning to wonder what exactly you're after here -- > saying that something is an "X" without saying anything about an API > isn't very useful. You need to have at least *some* API to be able to > do anything with that knowledge.
Apologies to Raymond if I'm putting words into his mouth, but I think it's more about *not* doing things with the type - a String is a Sequence that we don't wish to iterate through (in the flatten case), so the code winds up looking like for elem in seq: if isinstance(elem, Sequence) and not isinstance(elem, String): recurse into the element else: deal with the element as atomic This implies that other "empty" abstract types aren't useful, though, as they are not subclasses of anything else... Paul. _______________________________________________ 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