Steven Bethard <[EMAIL PROTECTED]> wrote: > below). I personally prefer the latter because it seems much more > likely that users will define alternate collection classes than that > users will define alternate string classes. My code would look like: > > def abc(arg1, arg2, arg3): > if not isinstance(arg2, basestring):
Moreover, if the user DID define alternate string classes, they really _should_ inherit basestring. basestring is a 'flag' class -- it doesn't give any functionality nor impose any burden -- all it exists for is to support this kind of isinstance usage. Alex -- http://mail.python.org/mailman/listinfo/python-list