[Python-checkins] bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647)
R. David Murray
webhook-mailer at python.org
Tue Sep 19 15:10:54 EDT 2017
https://github.com/python/cpython/commit/9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2
commit: 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2
branch: master
author: Rohit Balasubramanian <brohit23 at outlook.com>
committer: R. David Murray <rdmurray at bitdance.com>
date: 2017-09-19T15:10:49-04:00
summary:
bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647)
files:
M Lib/email/utils.py
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index a759d23308d..39c22406078 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