Stuart D Gathman added the comment:
Test cases so far:
parseaddr('[EMAIL PROTECTED]')
('', '[EMAIL PROTECTED]')
parseaddr('Full Name [EMAIL PROTECTED]')
('Full Name', '[EMAIL PROTECTED]')
parseaddr('[EMAIL PROTECTED] [EMAIL PROTECTED]')
('[EMAIL PROTECTED]', '[EMAIL PROTECTED
Stuart D Gathman added the comment:
See Issue1025395
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1221
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Stuart D Gathman added the comment:
Same or related issues: Issue1221, Issue1409460
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1025395
_
___
Python-bugs-list mailing
Stuart D Gathman added the comment:
tiran: yes, but that is the wrong answer, and that example is already in
the testcase list (with what I believe is the right answer).
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1025395
Changes by Stuart D Gathman:
--
type: - behavior
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1025395
_
___
Python-bugs-list mailing list
Unsubscribe:
http
Stuart D Gathman added the comment:
# A quick and very dirty fix for common broken cases, with test cases.
import rfc822
def parseaddr(t):
Split email into Fullname and address.
parseaddr('[EMAIL PROTECTED]')
('', '[EMAIL PROTECTED]')
parseaddr('Full Name [EMAIL PROTECTED
Stuart D Gathman added the comment:
Ok, I see the '@' is technically not allowed in an atom. But it either
needs to throw an invalid syntax exception, or heuristically return
something reasonable.
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Stuart D Gathman added the comment:
Repeating because previous real life test case was rejected as 'spam':
It also fails to parse:
from email.Utils import parseaddr
parseaddr('[EMAIL PROTECTED] [EMAIL PROTECTED]')
('', '[EMAIL PROTECTED]')
Getting the wrong part as the actual email to boot