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

Support for merge and update (| and |=) in IntervalDict, following Python 3.9's changes for dict #37

Closed
AlexandreDecan opened this issue Aug 28, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@AlexandreDecan
Copy link
Owner

Python 3.9 will be released on October 5th. Among the chances for this version, dict now supports | and |=, respectively for merge and update. See https://www.python.org/dev/peps/pep-0584/

Since IntervalDict aims to follow the interface of a traditional dict, we should implement them as well.
|= will be easy to do, since we can simply delegate to IntervalDict.update.
For |, it is a bit more tricky, and the current plan would be to first copy the current instance, then update this copy and return it.

Since that's a quite easy issue to address, let's label it as "good first issue" ;)

@AlexandreDecan AlexandreDecan added enhancement New feature or request good first issue Good for newcomers labels Aug 28, 2020
AlexandreDecan added a commit that referenced this issue Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant