[Python-3000] Fwd: proposal: disambiguating type

Talin talin at acm.org
Tue May 23 07:57:33 CEST 2006


Guido van Rossum wrote:
> I think this is a reasonable suggestion. Perhaps less code would break
> if you renamed the metaclass instead of the inquiry function.
> 
> --Guido

I'd like to lend my support to Tomer's proposal. I have been confused 
(repeatedly, which is a bad sign) by the conflation of the type-query 
and type-construction uses of 'type'.

As far as renaming the metaclass goes, I think that 'type' is a really 
good name for the metaclass, so even if it would break less things, 
there's a strong mnemonic value in keeping it the way it is. I think 
'typeof' is a reasonably good name for the query function.

(In fact, the first time I tried to use type( x ), I accidentally typed 
'typeof( x )'. So this is one data point as to how intuitive the name is.)

-- Talin


More information about the Python-3000 mailing list