On 7/11/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.

Maybe. Like that, sure. But what about:

 a = {a: 1, b: 2}

where 'a' and 'b' happen to be equal (or equal enough for dicts)? I'd rather leave this kind of checking up to pycheker or pylint (which already check for quite a lot more than I'd want the Python runtime to check :) That doesn't mean I think pychecker/pylint shouldn't be incorporated in the core, maybe even run by default, but that's another discussion ;)

--
Thomas Wouters <[EMAIL PROTECTED]>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________
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

Reply via email to