Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UserDict.get to account for __missing__ #83445

Closed
bharel mannequin opened this issue Jan 8, 2020 · 3 comments
Closed

Fix UserDict.get to account for __missing__ #83445

bharel mannequin opened this issue Jan 8, 2020 · 3 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@bharel
Copy link
Mannequin

bharel mannequin commented Jan 8, 2020

BPO 39264
Nosy @bharel
PRs
  • bpo-39264: Fix UserDict.get() to account for __missing__() #17910
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-01-08.23:51:15.983>
    labels = ['3.7', '3.8', 'type-bug', 'library', '3.9']
    title = 'Fix UserDict.get to account for __missing__'
    updated_at = <Date 2020-01-09.00:12:54.440>
    user = 'https://github.com/bharel'

    bugs.python.org fields:

    activity = <Date 2020-01-09.00:12:54.440>
    actor = 'bar.harel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2020-01-08.23:51:15.983>
    creator = 'bar.harel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39264
    keywords = ['patch']
    message_count = 2.0
    messages = ['359633', '359641']
    nosy_count = 1.0
    nosy_names = ['bar.harel']
    pr_nums = ['17910']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue39264'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented Jan 8, 2020

    Unlike dict, UserDict.__missing__ is called on .get().
    After a discussion on the Python-Dev mailing list, mimicking dict's behavior was chosen as a solution to the issue.

    @bharel bharel mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jan 8, 2020
    @bharel
    Copy link
    Mannequin Author

    bharel mannequin commented Jan 9, 2020

    See also bpo-39267

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @slateny slateny closed this as completed Dec 10, 2022
    @bharel
    Copy link
    Contributor

    bharel commented Apr 17, 2023

    Please see #83448 as well.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants