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

Clean up some checks in dict implementation #72381

Closed
zhangyangyu opened this issue Sep 18, 2016 · 4 comments
Closed

Clean up some checks in dict implementation #72381

zhangyangyu opened this issue Sep 18, 2016 · 4 comments
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@zhangyangyu
Copy link
Member

BPO 28194
Nosy @vstinner, @methane, @serhiy-storchaka, @zhangyangyu
Files
  • dict_clean_up.patch
  • dict_clean_up_v2.patch
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2016-09-26.18:31:36.753>
    created_at = <Date 2016-09-18.09:12:17.100>
    labels = ['interpreter-core', 'type-feature', '3.7']
    title = 'Clean up some checks in dict implementation'
    updated_at = <Date 2016-09-26.18:31:36.752>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2016-09-26.18:31:36.752>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-09-26.18:31:36.753>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2016-09-18.09:12:17.100>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['44734', '44738']
    hgrepos = []
    issue_num = 28194
    keywords = ['patch']
    message_count = 4.0
    messages = ['276875', '276892', '276894', '277444']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'methane', 'python-dev', 'serhiy.storchaka', 'xiang.zhang']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28194'
    versions = ['Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    The proposed patch cleans up some unnecessary parts in dict implementation especially NULL checks in lookup functions. There are four states a DictKeyEntry can be. Only in unused(empty) and dummy states me_key can be NULL. So NULL checks in used and pending states are not needed.

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Sep 18, 2016
    @serhiy-storchaka
    Copy link
    Member

    LGTM if address methane's comment.

    @zhangyangyu
    Copy link
    Member Author

    Apply methane's comment, preserving the comment.

    @serhiy-storchaka serhiy-storchaka self-assigned this Sep 26, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 26, 2016

    New changeset 1d41d741bb5b by Serhiy Storchaka in branch '3.6':
    Issue bpo-28194: Clean up some checks in dict implementation.
    https://hg.python.org/cpython/rev/1d41d741bb5b

    New changeset b83a70afca39 by Serhiy Storchaka in branch 'default':
    Issue bpo-28194: Clean up some checks in dict implementation.
    https://hg.python.org/cpython/rev/b83a70afca39

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    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 interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants