Detect duplicate keys in dictionary literals

Bug #1530909 reported by Ian Cordasco
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Pyflakes
New
Undecided
Unassigned

Bug Description

It would be great if PyFlakes could catch users specifying duplicate keys in dictionary literals, e.g.,

    d = {
        'a': 1,
        'b': 2,
        'a': 3,
    }

That second 'a' would be useful to be warned about.

Tags: easy
John Vandenberg (jayvdb)
tags: added: easy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.