[Python-checkins] bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3733)
Mariatta
webhook-mailer at python.org
Sat Oct 7 01:27:42 EDT 2017
https://github.com/python/cpython/commit/93c0885dc84381cbbb970402b1a21bf690ee312c
commit: 93c0885dc84381cbbb970402b1a21bf690ee312c
branch: 3.6
author: Rohit Balasubramanian <brohit23 at outlook.com>
committer: Mariatta <Mariatta at users.noreply.github.com>
date: 2017年10月06日T22:27:36-07:00
summary:
bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3733)
(cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2)
files:
M Lib/email/utils.py
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index a759d23308d..e2bfb362c6e 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -215,6 +215,12 @@ def parsedate_to_datetime(data):
def parseaddr(addr):
+ """
+ Parse addr into its constituent realname and email address parts.
+
+ Return a tuple of realname and email address, unless the parse fails, in
+ which case return a 2-tuple of ('', '').
+ """
addrs = _AddressList(addr).addresslist
if not addrs:
return '', ''
More information about the Python-checkins
mailing list