[Python-Dev] Re: [Python-checkins] python/dist/src/Lib types.py,1.26,1.27

Barry A. Warsaw barry@zope.com
Wed, 22 May 2002 12:45:32 -0400


>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    GvR> I think the plan is to stop recommending the types module --
    GvR> maybe deprecating it too.

Why?  Isn't this still a useful idiom:

from types import *
...
if isinstance(x, StringTypes):
    # blah

Yah, I know many of the fundamental types are available as builtins,
but not all of them.  Or are we saying that we'd now rather see the
above written as:

if isinstance(x, (str, unicode)):
    # blah

?
-Barry