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

add set/delete/update functions #271

Merged
merged 2 commits into from Oct 16, 2023

Conversation

matthiasdiener
Copy link
Contributor

@matthiasdiener matthiasdiener commented Oct 6, 2023

Modeled after the same API in immutables.Map, pyrsistent.Map, and frozendict.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #271 (ed9759d) into master (bdf02ce) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #271   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           59        71   +12     
=========================================
+ Hits            59        71   +12     
Flag Coverage Δ
3.11 100.00% <100.00%> (?)
3.12 ?
3.8 100.00% <100.00%> (?)
3.9 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
immutabledict/__init__.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@corenting
Copy link
Owner

I see that the upstream PR that needed these changes has been superseded by another one. Is this still needed?

@matthiasdiener
Copy link
Contributor Author

I see that the upstream PR that needed these changes has been superseded by another one. Is this still needed?

We would like to use these functions elsewhere, so this PR would still be useful to us.

@matthiasdiener
Copy link
Contributor Author

matthiasdiener commented Oct 6, 2023

Due to #263 (I think), there is now an incompatibility with dict. Not sure this was intentional:

$ python
>>> dict(a=1)
{'a': 1}
>>>
>>> from immutabledict import immutabledict
>>> immutabledict(a=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: immutabledict.__new__() got an unexpected keyword argument 'a'

Fixed in #273.

@corenting
Copy link
Owner

corenting commented Oct 16, 2023

Thanks for the PR!

@corenting corenting enabled auto-merge (squash) October 16, 2023 19:41
@corenting corenting merged commit 1f1f1ec into corenting:master Oct 16, 2023
9 checks passed
@matthiasdiener matthiasdiener deleted the set_delete branch October 16, 2023 20:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants