bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647)

This commit is contained in:
Rohit Balasubramanian 2017-09-20 00:40:49 +05:30 committed by R. David Murray
parent 9abee722d4
commit 9e7b9b21fe
1 changed files with 6 additions and 0 deletions

View File

@ -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 '', ''