Skip to content

Conversation

PrzemekRychter
Copy link
Contributor

Addition to description of Map.pop!/2

Removes the value associated with `key` in `map` and returns the value
and the updated map, or it raises if `key` is not present.
Removes and returns the value associated with `key` in `map` alongside
the updated map, or raises if `key` is not present.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this sentence because it should be remain small but kept the rest. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the updated map, or raises if `key` is not present.
the updated map, or raises a `KeyError` exception if `key` is not present.

Ok, but "raises what if"? I guess there should be something or that part can be skipped since in line 715 it is mentioned that this function raises error when key is not present

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"raises" in Elixir is always about exceptions. The details of which exception can be found in the next paragraph. :)

@josevalim josevalim merged commit 12dc4b5 into elixir-lang:main Sep 17, 2024
9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants