bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3733)
(cherry picked from commit 9e7b9b21fe
)
This commit is contained in:
parent
051295a8c5
commit
93c0885dc8
|
@ -215,6 +215,12 @@ def parsedate_to_datetime(data):
|
||||||
|
|
||||||
|
|
||||||
def parseaddr(addr):
|
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
|
addrs = _AddressList(addr).addresslist
|
||||||
if not addrs:
|
if not addrs:
|
||||||
return '', ''
|
return '', ''
|
||||||
|
|
Loading…
Reference in New Issue