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

[Feature Request] Support popitem() for Dict #2355

Closed
1 task done
jayzhan211 opened this issue Apr 20, 2024 · 0 comments
Closed
1 task done

[Feature Request] Support popitem() for Dict #2355

jayzhan211 opened this issue Apr 20, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed mojo-repo Tag all issues with this label

Comments

@jayzhan211
Copy link
Contributor

jayzhan211 commented Apr 20, 2024

Review Mojo's priorities

What is your request?

Python Dict has popitem()

Remove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order

What is your motivation for this change?

I'm not sure if this is an important method (non syntactic sugar), if yes I can help to work on it, otherwise we hold it and work on others

Any other details?

No response

@jayzhan211 jayzhan211 added enhancement New feature or request mojo Issues that are related to mojo labels Apr 20, 2024
@linear linear bot removed the mojo Issues that are related to mojo label Apr 29, 2024
@ematejska ematejska added the mojo-repo Tag all issues with this label label Apr 29, 2024
@JoeLoser JoeLoser added mojo-stdlib Tag for issues related to standard library good first issue Good for newcomers and removed mojo-python-interop labels May 4, 2024
@JoeLoser JoeLoser added the help wanted Extra attention is needed label May 5, 2024 — with Linear
@ematejska ematejska removed the mojo-stdlib Tag for issues related to standard library label May 6, 2024
modularbot pushed a commit that referenced this issue May 28, 2024
[External] [stdlib] Support `Dict.popitem()`

Implement `Dict.popitem()` which removes and
returns the last item in the `Dict`.

Fixes #2355

---------

Co-authored-by: Jay Zhan <jayzhan211@gmail.com>
Closes #2701
MODULAR_ORIG_COMMIT_REV_ID: c93387c953e05a447e6467270c54093b85e743b0
modularbot pushed a commit that referenced this issue Jun 1, 2024
Implement `Dict.popitem()` which removes and
returns the last item in the `Dict`.

Fixes #2355.

Reapply after it got reverted now that the UB
in `reversed()` for `Dict` has been fixed.

MODULAR_ORIG_COMMIT_REV_ID: d8bf29ed0aeb6d59a9a0a3af650ce141993faa83
modularbot pushed a commit that referenced this issue Jun 7, 2024
[External] [stdlib] Support `Dict.popitem()`

Implement `Dict.popitem()` which removes and
returns the last item in the `Dict`.

Fixes #2355

---------

Co-authored-by: Jay Zhan <jayzhan211@gmail.com>
Closes #2701
MODULAR_ORIG_COMMIT_REV_ID: c93387c953e05a447e6467270c54093b85e743b0
modularbot pushed a commit that referenced this issue Sep 13, 2024
Implement `Dict.popitem()` which removes and
returns the last item in the `Dict`.

Fixes #2355.

Reapply after it got reverted now that the UB
in `reversed()` for `Dict` has been fixed.

MODULAR_ORIG_COMMIT_REV_ID: d8bf29ed0aeb6d59a9a0a3af650ce141993faa83
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 help wanted Extra attention is needed mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

3 participants