-
Notifications
You must be signed in to change notification settings - Fork 0
[dict] .popitem() returns arbitrary element #2
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workinglanguage issuesIssues related to differences between the different Python versions or implementationsIssues related to differences between the different Python versions or implementations
Description
Activity
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglanguage issuesIssues related to differences between the different Python versions or implementationsIssues related to differences between the different Python versions or implementations
See this test.
On Python/Jython <3.6 the order of elements in lists/dictionaries is not guaranteed, and in this cases this leads to unexpected results in the original
.popitem()method.For example, the following could happen on Python 2.7-3.5:
Should this be kept as intended behaviour (ordered dictionaries were made default in Python 3.6) or should the polyfill conform to the current standard?