bpo-31507 Add docstring to parseaddr function in email.utils.parseadd… · python/cpython@93c0885 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 93c0885
authored and
committed
(cherry picked from commit 9e7b9b2)
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -215,6 +215,12 @@ def parsedate_to_datetime(data): | ||
215 | 215 | |
216 | 216 | |
217 | 217 | def parseaddr(addr): |
218 | +""" | |
219 | + Parse addr into its constituent realname and email address parts. | |
220 | + | |
221 | + Return a tuple of realname and email address, unless the parse fails, in | |
222 | + which case return a 2-tuple of ('', ''). | |
223 | + """ | |
218 | 224 | addrs = _AddressList(addr).addresslist |
219 | 225 | if not addrs: |
220 | 226 | return '', '' |