On Sun, Jun 1, 2008 at 6:57 AM, Paul Moore <[EMAIL PROTECTED]> wrote: > 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
I thought that was he meant too, until he said he rejected my offhand suggestion of Atomic with these words: "Earlier in the thread it was made clear that that atomicity is not an intrinsic property of a type; instead it varies across applications [...]" > This implies that other "empty" abstract types aren't useful, though, > as they are not subclasses of anything else... There's a thread on this out now I believe. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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