X Tutup
The Wayback Machine - https://web.archive.org/web/20250525215711/https://github.com/python/cpython/issues/93753
Skip to content

Make dict.pop and dict.get "default"-argument a keyword argument #93753

Closed as not planned
@carlbordum

Description

@carlbordum

Feature or enhancement

Make dict methods pop and get "default" a keyword argument.

Pitch

Code can be more readable.

d.get(count, 0)

# vs

d.get(count, default=0)

Previous discussion

This was proposed last week on python-ideas:
https://mail.python.org/archives/list/python-ideas@python.org/thread/IFM3QL67EWQCROPIX3DNCR44F4ULMFD3/

If there's consensus, I'm up for implementing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup