diff options
author | Rohit Balasubramanian <brohit23@outlook.com> | 2017-10-07 05:29:54 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-10-07 05:29:54 (GMT) |
commit | c829bbf68fc4a845b96d3bf30d868f62a5d3332a (patch) | |
tree | c9a26113ede41e5dc1343d1687e1324d9555c972 | |
parent | 2fb8e9385944276884c2a2dc5d6275a04e04c879 (diff) | |
download | cpython-c829bbf68fc4a845b96d3bf30d868f62a5d3332a.zip cpython-c829bbf68fc4a845b96d3bf30d868f62a5d3332a.tar.gz cpython-c829bbf68fc4a845b96d3bf30d868f62a5d3332a.tar.bz2 |
bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3735)
(cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2)
-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 ac13f49..a74db42 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 '', '' |