On 7/10/06, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> Currently, this is valid:
>
> a = {'a': 1, 'a': 2}
> print a # {'a': 2}
>
> I wonder if we shouldn't make this a run-time error instead.
If it's possible, definitely. That's gotta be a typo if it appears in
real code.
> If people agree, what should we do with
>
> a = {'a': 1, 'a': 1}
>
> ???
It should also be an error. I can't imagine that not being a typo.
And there isn't really any reason to write that since we're talking
dict literals here.
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
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com