Skip to content

Use PyDict_Pop() #116437

Closed
Closed

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

Activity

  1. added 2 commits that reference this issue on Mar 6, 2024
  2. added a commit that references this issue on Mar 25, 2024
  3. added a commit that references this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions