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 support for several keys, values, indexes in UDict.get() #45

Open
bleudev opened this issue Jul 6, 2024 · 0 comments
Open

Add support for several keys, values, indexes in UDict.get() #45

bleudev opened this issue Jul 6, 2024 · 0 comments
Assignees
Labels
invalid This doesn't seem right new feature New feature
Milestone

Comments

@bleudev
Copy link
Member

bleudev commented Jul 6, 2024

Example:

UDict.get(key=['first', 'second']) # ['value for first key', 'value for second key']
UDict.get(index=[1, 3])
# also support for slice
UDict.get(index=slice(1, 9, 2))

UDict.get(value=['first value', 'second value']

It's very easy to create:

get(...):
    ...
    r = []
    if isinstance(key, (list, tuple)):
        for i in key:
            r.append(self.get(key=i))
    ... # (for another parameters)
@bleudev bleudev added new feature New feature invalid This doesn't seem right labels Jul 6, 2024
@bleudev bleudev added this to the 0.3 milestone Jul 6, 2024
@bleudev bleudev self-assigned this Jul 6, 2024
@bleudev bleudev added this to Ufpy Jul 6, 2024
@github-project-automation github-project-automation bot moved this to ⚠ To-Do in Ufpy Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right new feature New feature
Projects
Status: ⚠ To-Do
Development

No branches or pull requests

1 participant