This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients ajaksu2, barry, eric.araujo, msapiro, r.david.murray
Date 2010-07-17.11:38:34
SpamBayes Score 0.004149695
Marked as misclassified No
Message-id <1279366717.37.0.39131027997.issue1409460@psf.upfronthosting.co.za>
In-reply-to
Content
I wonder if this bug should be reopened. This behavior does not seem right to me:

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

parsing 'merwok wok@rusty'
 expected ('', 'wok@rusty')
 got      ('', 'merwokwok@rusty')

(Generated with a twenty-line 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, nor do I know if the folding done in the second example is okay.

For background, the thing I’m trying to achieve is to take a string and parse it into name and email address, and print a warning if there is no email. It’d be nice if I could always test for “not parseaddr(s)[1]”, or pass an argument to the function to get an exception. Maybe I’ll have to restrict my format and do my own parsing with str.[r]partition.
History
Date User Action Args
2010-07-17 11:38:37eric.araujosetrecipients: + eric.araujo, barry, msapiro, ajaksu2, r.david.murray
2010-07-17 11:38:37eric.araujosetmessageid: <1279366717.37.0.39131027997.issue1409460@psf.upfronthosting.co.za>
2010-07-17 11:38:35eric.araujolinkissue1409460 messages
2010-07-17 11:38:34eric.araujocreate