[Python-ideas] dictionary constructor should not allow duplicate keys

Michael Selik michael.selik at gmail.com
Wed May 4 11:29:40 EDT 2016


On Wed, May 4, 2016 at 11:19 AM Guido van Rossum <guido at python.org> wrote:

> - In ABC, this was considered, and the rule was that {k1: v1; k2: v2} was
> allowed to have k1==k2 as long as v1==v2. Otherwise it was an error. (But
> ABC did not have comprehensions.)
>

Was that enforced by comparing the expressions or the resulting values?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160504/b0de6acc/attachment.html>


More information about the Python-ideas mailing list