[Python-3000] No Container Literals

Steven Bethard steven.bethard at gmail.com
Sat Jul 8 18:51:38 CEST 2006


On 7/8/06, Calvin Spealman <ironfroggy at gmail.com> 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)

I don't see how your proposal solves the problem of distinguishing
``["abc"]`` from ``list("abc")`` where the former is a list of a
single three-character element and the later is a list of three
one-character elements.  And no, throwing away the <type>(<iterable>)
constructor is not going to work -- it's far too useful.

Remember, Python 3000 is not a new language.  It's Python 2.X with
some of the warts removed.

Steve
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy


More information about the Python-3000 mailing list