Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipython MUST preserve order of keys while showing the contents of a dict #11013

Closed
socketpair opened this issue Feb 17, 2018 · 1 comment
Closed
Milestone

Comments

@socketpair
Copy link

In [1]: qwe = {1:2, 3:4}

In [2]: asd = {3:4, 1:2}

In [3]: qwe
Out[3]: {1: 2, 3: 4}

In [4]: asd
Out[4]: {1: 2, 3: 4}

In [5]: list(asd.items())
Out[5]: [(3, 4), (1, 2)]

In [6]: list(qwe.items())
Out[6]: [(1, 2), (3, 4)]

Since Python 3.6 order of dict items is always preserved.

@ivanov
Copy link
Member

ivanov commented Feb 23, 2018

Hi @socketpair - thanks for your report. @takluyver took care of this in #10958 and it will be released in the next version of IPython (both 6.3 and 5.6). I am closing this report as a duplicate of #10110.

Happy hacking! :bowtie:

@ivanov ivanov closed this as completed Feb 23, 2018
@Carreau Carreau added this to the 5.6 milestone Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants