This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: minor efficiency and clarity improvements in email package
Type: Stage: resolved
Components: email Versions: Python 3.8
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, maxking, r.david.murray, selik
Priority: normal Keywords: patch

Created on 2018-06-29 19:02 by selik, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7999 closed selik, 2018-06-29 19:02
Messages (3)
msg320730 - (view) Author: Michael Selik (selik) * Date: 2018-06-29 19:02
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.

https://github.com/python/cpython/pull/7999/
msg352825 - (view) Author: Abhilash Raj (maxking) * (Python committer) Date: 2019-09-20 03:25
New changeset 2702638eabe5f7b25f36d295f0ad78cb8d4eda05 by Abhilash Raj (Michael Selik) in branch 'master':
bpo-34002: Minor efficiency and clarity improvements in email package. (GH-7999)
https://github.com/python/cpython/commit/2702638eabe5f7b25f36d295f0ad78cb8d4eda05
msg352826 - (view) Author: Abhilash Raj (maxking) * (Python committer) Date: 2019-09-20 03:26
PR is now merged.
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78183
2019-09-20 03:26:40maxkingsetstatus: open -> closed

messages: + msg352826
nosy: barry, r.david.murray, maxking, selik
stage: patch review -> resolved
2019-09-20 03:26:00maxkingsetnosy: + maxking
messages: + msg352825
2018-06-29 19:04:33seliksetnosy: + barry, r.david.murray

components: + email
versions: + Python 3.8
2018-06-29 19:02:59seliksetkeywords: + patch
stage: patch review
pull_requests: + pull_request7620
2018-06-29 19:02:30selikcreate