summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRohit Balasubramanian <brohit23@outlook.com>2017-09-19 19:10:49 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2017-09-19 19:10:49 (GMT)
commit9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2 (patch)
tree39cf6e83d54257452a6f4dba8a8a2cc704cc0710 /Lib
parent9abee722d448c1c00c7d4e11ce242ec7b13e5c49 (diff)
downloadcpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.zip
cpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.tar.gz
cpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.tar.bz2
bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index a759d23..39c2240 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 '', ''