"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > John Roth wrote: > >> you need _both_ isinstance and the types module to do a correct >> check for any string type: isinstance(fubar, types.StringTypes). >> That's because both string and unicode are subtypes of one base. > > But basestring, their base class is a built-in.
True, but that wasn't the question. However, to add a bit of sanity to this thread, please consider that PEP 294 is still open - it survived the recent spate of PEP rejections and closings. It suggests extending the types module to include all types, including those in the new module (which the OP seems to have overlooked,) and then depreciating the new module. John Roth > -- > Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list