]> granicus.if.org Git - python/commitdiff
bpo-31507: Add docstring to parseaddr function in email.utils.parseaddr (GH-3647...
authorRohit Balasubramanian <brohit23@outlook.com>
Sat, 7 Oct 2017 05:29:54 +0000 (10:59 +0530)
committerMariatta <Mariatta@users.noreply.github.com>
Sat, 7 Oct 2017 05:29:54 +0000 (22:29 -0700)
(cherry picked from commit 9e7b9b21fe45f7d93eaf9382fedfa18247d0d2b2)

Lib/email/utils.py

index ac13f49d599df9b63c7ca5a205eea5491b14d7cb..a74db42286e7b646148a4536fe6dfcefc3bf702b 100644 (file)
@@ -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 '', ''