[Python-Dev] quick poll: could int, str, tuple etc. become type objects?

Steven D. Majewski sdm7g@Virginia.EDU
Tue, 5 Jun 2001 16:41:11 -0400 (EDT)


On Tue, 5 Jun 2001, Guido van Rossum wrote:

> Now invoke the Zen of Python: "There should be one-- and preferably
> only one --obvious way to do it."  So why not make these built-in
> functions *be* the corresponding types?  Then instead of

+1 

> - Do we really want to have built-in names for code objects, traceback
>   objects, and other figments of Python's internal workings?


I would say to put all of the common constructors in __builtin__, 
and all of the odd ducks can go into the new module. 


> - What should the argument to dict() be?  A list of (key, value)
>   pairs, a list of alternating keys and values, or something else?

A varargs list of (key,value) tuples would probably be most useful. 

Since most of these functions, before being classed as constructors,
were considered coercion function, I wouldn't be against having it
try to do something sensible with a variety of args. 

-- sdm