From: Rohit Balasubramanian Date: Sat, 7 Oct 2017 05:29:54 +0000 (+0530) Subject: bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647... X-Git-Tag: v2.7.15rc1~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c829bbf68fc4a845b96d3bf30d868f62a5d3332a;p=python bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3735) (cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2) --- diff --git a/Lib/email/utils.py b/Lib/email/utils.py index ac13f49d59..a74db42286 100644 --- a/Lib/email/utils.py +++ b/Lib/email/utils.py @@ -211,6 +211,12 @@ def parsedate_tz(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 '', ''