Skip to content

Use PyDict_Pop() #116437

Closed
Closed
@serhiy-storchaka

Description

@serhiy-storchaka

PyDict_Pop() can be used in two cases:

  • If the PyDict_Get* call is followed by the PyDict_Del* call.
  • If the PyDict_Del* call is followed by the code that handles KeyError.

In both cases the use of PyDict_Pop() can make the code clearer.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions