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

minor efficiency and clarity improvements in email package #78183

Closed
selik mannequin opened this issue Jun 29, 2018 · 3 comments
Closed

minor efficiency and clarity improvements in email package #78183

selik mannequin opened this issue Jun 29, 2018 · 3 comments
Labels
3.8 only security fixes topic-email

Comments

@selik
Copy link
Mannequin

selik mannequin commented Jun 29, 2018

BPO 34002
Nosy @warsaw, @bitdancer, @maxking, @selik
PRs
  • bpo-34002: Minor efficiency and clarity improvements in email package. #7999
  • 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 = <Date 2019-09-20.03:26:40.365>
    created_at = <Date 2018-06-29.19:02:30.231>
    labels = ['3.8', 'expert-email']
    title = 'minor efficiency and clarity improvements in email package'
    updated_at = <Date 2019-09-20.03:26:40.364>
    user = 'https://github.com/selik'

    bugs.python.org fields:

    activity = <Date 2019-09-20.03:26:40.364>
    actor = 'maxking'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-09-20.03:26:40.365>
    closer = 'maxking'
    components = ['email']
    creation = <Date 2018-06-29.19:02:30.231>
    creator = 'selik'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34002
    keywords = ['patch']
    message_count = 3.0
    messages = ['320730', '352825', '352826']
    nosy_count = 4.0
    nosy_names = ['barry', 'r.david.murray', 'maxking', 'selik']
    pr_nums = ['7999']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34002'
    versions = ['Python 3.8']

    @selik
    Copy link
    Mannequin Author

    selik mannequin commented Jun 29, 2018

    The primary motivation for these improvements was avoiding a while/pop pattern for looping. A for-loop is a big improvement over copying a list, then repeatedly popping the 0th element.

    A lesser improvement is the use of a.intersection(b) instead of c = set(b); len(c) > len(c - a). The check for intersection is more clear, and it avoids an unnecessary set construction.

    #7999

    @selik selik mannequin added topic-email 3.8 only security fixes labels Jun 29, 2018
    @maxking
    Copy link
    Contributor

    maxking commented Sep 20, 2019

    New changeset 2702638 by Abhilash Raj (Michael Selik) in branch 'master':
    bpo-34002: Minor efficiency and clarity improvements in email package. (GH-7999)
    2702638

    @maxking
    Copy link
    Contributor

    maxking commented Sep 20, 2019

    PR is now merged.

    @maxking maxking closed this as completed Sep 20, 2019
    @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.8 only security fixes topic-email
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant