On May 4, 2016 2:47 AM, "Pavol Lisy" <email@example.com> wrote:
> 2016-05-04 6:03 GMT+02:00, Nick Coghlan <firstname.lastname@example.org>:
> > I was curious as to whether or not it was technically feasible to
> > implement this "duplicate keys" check solely for dict displays in
> > CPython without impacting other dict use cases, and it turns out it
> > should be.
> > 1. Report a DeprecationWarning in 3.6
> > 2. Report a [RuntimeError? ValueError?] in 3.7+
> But what about SyntaxError instead of RuntimeError? Could it be easily
> done too?
Is it really a SyntaxError? The compiler knows what the source code means, but it assumes that the meaning is not what you intended.