R. David Murray <rdmur...@bitdance.com> added the comment:

OK, I've studied this more, and it looks to me like the legacy address format 
allows multiple atoms separated by white space in the local part of the 
address.  This means that the correct parse would be

  ('', 'merwok w...@rusty.com')

How useful this parse is is a good question.  It is arguably better than losing 
the white space; however, the fact that it represents a behavior change and 
there's no actual user bug against this argues against backport.  I do think it 
is better to conform to the RFC as much as possible, though, so I'd like to fix 
this in 3.2.

Attached is a patch to the parser that preserves whitespace runs in between 
unquoted atoms in the local part.

It would be interesting to know what other email programs do with such 
addresses.

----------
keywords: +patch
stage:  -> patch review
versions:  -Python 2.7, Python 3.1
Added file: 
http://bugs.python.org/file20025/preserve_unquoted_white_space_in_local_part.diff

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

Reply via email to