Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

Is this a case of realname having @ inside an unquoted string? As I can see 
from the RFC the acceptable characters of an atom other than alphabets and 
digits that comprises a phrase are ['!', '#', '$', '%', '&', "'", '*', '+', 
'-', '/', '=', '?', '^', '_', '`', '{', '|', '}', '~'] . So just curious if 
it's a case of @ inside unquoted string as name?

>>> for char in accepted:
...     print(parseaddr(f'John Doe jdoe{char}example.com <ot...@example.net>'))
...
('John Doe jdoe!example.com', 'ot...@example.net')
('John Doe jdoe#example.com', 'ot...@example.net')
('John Doe jdoe$example.com', 'ot...@example.net')
('John Doe jdoe%example.com', 'ot...@example.net')
('John Doe jdoe&example.com', 'ot...@example.net')
("John Doe jdoe'example.com", 'ot...@example.net')
('John Doe jdoe*example.com', 'ot...@example.net')
('John Doe jdoe+example.com', 'ot...@example.net')
('John Doe jdoe-example.com', 'ot...@example.net')
('John Doe jdoe/example.com', 'ot...@example.net')
('John Doe jdoe=example.com', 'ot...@example.net')
('John Doe jdoe?example.com', 'ot...@example.net')
('John Doe jdoe^example.com', 'ot...@example.net')
('John Doe jdoe_example.com', 'ot...@example.net')
('John Doe jdoe`example.com', 'ot...@example.net')
('John Doe jdoe{example.com', 'ot...@example.net')
('John Doe jdoe|example.com', 'ot...@example.net')
('John Doe jdoe}example.com', 'ot...@example.net')
('John Doe jdoe~example.com', 'ot...@example.net')

>>> parseaddr('"John Doe j...@example.com" <ot...@example.net>')
('John Doe j...@example.com', 'ot...@example.net')

>>> parseaddr('John Doe j...@example.com <ot...@example.net>')
('', 'John Doe j...@example.com')

----------
nosy: +xtreak

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to