[Python-3000] Types and classes

Guido van Rossum guido at python.org
Thu Apr 3 01:52:26 CEST 2008


On Wed, Apr 2, 2008 at 4:45 PM, Paul Prescod <paul at prescod.net> wrote:
> Also, could the types module be renamed "builtin_classes" or
>  "core_classes" or something like that? It was always a weird name
>  because it wasn't if it contained all of the types in a Python
>  distribution. Just a set of core-to-the-implementation ones.

That's up to the stdlib reorg committee; my position has been for a
long time that there shouldn't be a types module at all.

>  Just out of curiousity: why is the type(x) function valuable when
>  x.__class__ is a viable alternative and has been one for a long time.

They aren't the same though. __class__ is overridable via __getattr__.
type() is not.

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


More information about the Python-3000 mailing list