8000 Can't compare dicts with both single and double quotes in keys · Issue #430 · seperman/deepdiff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can't compare dicts with both single and double quotes in keys #430
Closed
@kammala

Description

@kammala

Describe the bug
DeepDiff falls with an exception while comparing dicts with keys containing both single and double quotes.

To Reproduce

import deepdiff

deepdiff.DeepDiff({'''a'"a''': 1}, {'''a'"a''': 2})

Expected behavior
A comparison result is being returned.

OS, DeepDiff version and Python version (please complete the following information):

  • DeepDiff Version: 6.7.0

Additional context
The branch to handle both single and double quotes in stringify_element doesn't define result variable which is used later in return statement which causes exception (UnboundLocalError: local variable 'result' referenced before assignment) to be triggered.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0