Ben Finney <[EMAIL PROTECTED]> wrote:
> Currently there's no good duck-typing way to differentiate
> strings from other sequences.

I suppose you could do something like:

try:
   foo.isalpha
except AttributeError:
   print "foo is not a string"

but other than proving that you don't *have* to use isinstance(), I don't 
think that approach has much going for it.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to