[Python-Dev] PEP 294: Type Names in the types Module

Oren Tirosh oren-py-d@hishome.net
Fri, 12 Jul 2002 18:44:28 +0300


On Fri, Jul 12, 2002 at 11:01:22AM -0400, Guido van Rossum wrote:
> I'd like to reject PEP 294.
> 
> Adding the type names that are already builtins to types.py is
> definitely a bad idea (the patch is full of lines like "int = int" --
> this can only serve to confuse).
> 
> I propose to leave types.py alone.
> 
> If we need a place to name types that don't deserve being builtins,
> perhaps new.py is a better place?

The new. prefix is natural enough for 

	m = new.module('name')

type but it looks pretty awkward in 

	if isinstance(obj, new.generator):

What's the meaning of 'new' in this context?

The idea of using the types module turned out to have more problems than 
appeared at first but new doesn't look much better to me.

Anyone has other suggestions?

	Oren