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

Assigning benedict element to itself clears the element #294

Closed
cdoolin opened this issue May 29, 2023 · 2 comments
Closed

Assigning benedict element to itself clears the element #294

cdoolin opened this issue May 29, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@cdoolin
Copy link

cdoolin commented May 29, 2023

Python version
3.11.10

Package version
0.30.0

Current behavior (bug description)

d = benedict({
    "a": {
        "b": 23
    }
})
print(d)
# {'a': {'b': 23}} 

d.a = d.a
print(d)
# {'a': {}}

Expected behavior
Assigning d.a = d.a should not change the dictionary. I would expect the following:

d = benedict({
    "a": {
        "b": 23
    }
})
print(d)
# {'a': {'b': 23}} 

d.a = d.a
print(d)
# {'a': {'b': 23}} 

Cheers

Fund with Polar
@cdoolin cdoolin added the bug Something isn't working label May 29, 2023
@fabiocaccamo
Copy link
Owner

@cdoolin thank you for reporting this.

@fabiocaccamo
Copy link
Owner

fabiocaccamo commented Jun 2, 2023

@cdoolin this has been fixed in 0.30.2 version.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Open Source Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants