[Python-3000] No Container Literals

Guido van Rossum guido at python.org
Sun Jul 9 23:30:55 CEST 2006


On 7/8/06, Aahz <aahz at pythoncraft.com> wrote:
> On Sat, Jul 08, 2006, Calvin Spealman wrote:
> > Just throwing this out there, but I would love to see a complete
> > dropping of container literals from Python. That is why I proposed the
> > coercion syntax (ex: list from something) because it would allow
> > things like list(1, 2, 3) and we can already do dict(ten=10,
> > eleven=11), so what is the real need for literals as they are? With
> > some proper compiler optimization we can deduce if list, dict, and
> > such are in fact bound to the builtins we know, and build literals
> > from these expressions just the same, but I feel they seem much more
> > readable, and allow better addition of more literal compilations (set
> > literals are fixed then, for example). I know no one will like this,
> > but I have to make the idea known anyway.
>
> Could someone add this to the rejected proposals PEP?

Done. Has Calvin explained *why* he wants this yet? (Not that that
will make me change my mind. I'm just curious. :-)

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


More information about the Python-3000 mailing list