From: Rohit Balasubramanian Date: Tue, 19 Sep 2017 19:10:49 +0000 (+0530) Subject: bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647) X-Git-Tag: v3.7.0a2~153 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2;p=thirdparty%2FPython%2Fcpython.git bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647) --- diff --git a/Lib/email/utils.py b/Lib/email/utils.py index a759d23308d3..39c224060780 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 '', ''