diff options
author | Rohit Balasubramanian <brohit23@outlook.com> | 2017-09-19 19:10:49 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2017-09-19 19:10:49 (GMT) |
commit | 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2 (patch) | |
tree | 39cf6e83d54257452a6f4dba8a8a2cc704cc0710 | |
parent | 9abee722d448c1c00c7d4e11ce242ec7b13e5c49 (diff) | |
download | cpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.zip cpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.tar.gz cpython-9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2.tar.bz2 |
bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (gh-3647)
-rw-r--r-- | Lib/email/utils.py | 6 |
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 '', '' |