New submission from Éric Araujo <mer...@netwok.org>:

This behavior does not seem right to me:

parsing 'merwok'
 expected ('merwok', '')
 got      ('', 'merwok')

parsing 'merwok w...@rusty'
 expected ('', 'w...@rusty')
 got      ('', 'merwok...@rusty')

(Generated with a small script just doing a loop and prints, not attached 
because boring.)

Are my expectations wrong? I don’t know if a string like “merwok” in my first 
example is a legal address in the relevant RFCs; Mark Sapiro replied in 
msg110556 that it could be consistent with most MUAs/MTAs.

I don’t know either if the folding done in the second example is okay; I’d like 
an exception here, or if parseaddr is designed to never fail, empty strings to 
indicate failure. I’m also okay with “garbage in, garbage out” as answer.

----------
components: Library (Lib)
messages: 110561
nosy: merwok, r.david.murray
priority: normal
severity: normal
status: open
title: email.utils.parseaddr returns garbage for invalid input
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
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