Skip to content

[mypyc] Propagate errors in dict helpers - #22320

Merged
p-sawicki merged 1 commit into
python:masterfrom
p-sawicki:dict-helpers-propagate-errors
Oct 30, 2026
Merged

p-sawicki merged 1 commit into
python:masterfrom
p-sawicki:dict-helpers-propagate-errors

Conversation

@p-sawicki

Copy link
Copy Markdown
Collaborator

Error values returned from cpython APIs are ignored when looking up the keys method (can fail if it's a property that raises), and when looking up if the element already exists during setdefault call (can fail if __hash__ raises).

Propagate the error values in those cases.

@p-sawicki
p-sawicki merged commit e6dd0ea into python:master Oct 30, 2026
18 checks passed
@p-sawicki
p-sawicki deleted the dict-helpers-propagate-errors branch October 30, 2026 12:34
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.

2 participants