Skip to content

VS Code shows wrong order of dict #566

@danieltuzes

Description

@danieltuzes

The issue has been closed, but the bug is still not resolved:
microsoft/vscode-python#3236
microsoft/vscode-python#7787

Environment data

  • VS Code version: 1.54.3
  • Extension version (available under the Extensions sidebar): v2021.3.658691958
  • OS and version: Win 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Value of the python.languageServer setting: pylance v2021.3.2

Expected behaviour

The debugger shows the dict element in the right order.

Actual behaviour

The debugger shows the dict elements in a wrong order.

Steps to reproduce:

Debug the code by inserting a breakpoint at the print statement:

atoms = {"H": 0, "He": 1, "Li": 2, "Be": 3}
print(atoms)

The debugger will show an alphabetic order. The function print produces the right result though.

Untitled-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions