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

Guido van Rossum guido@python.org
Fri, 24 May 2002 15:20:28 -0400


Looks like a good starting point.  Note the convenience of
isinstance(x, (t1, t2, t3)).

>         BuiltinFunctionType             ???
>         BuiltinMethodType               ???
>         ClassType                       ???
>         CodeType                        ???
>         DictProxyType                   ???
>         FrameType                       ???
>         FunctionType, LambdaType        ???                           
>         GeneratorType                   ???
>         InstanceType                    ???
>         MethodType, UnboundMethodType   ???
>         ModuleType                      ???
>         TracebackType                   ???

None of these will be greatly missed except by introspective code.
Hm, I wonder if inspect would be the right module to export these
types?  Or maybe one should simply be encouraged to use
inspect.ismodule() etc.?  (The type names are still somewhat useful
because they can be used as keys for dispatch tables.)

--Guido van Rossum (home page: http://www.python.org/~guido/)