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 zenzen
Recipients
Date 2004-09-07.05:30:20
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=46639

I think that adding options to the existing APIs simply makes the Unicode 
support feel tacked on (as it would be). It is also error prone, where if 
you are following best practice and using Unicode everywhere, you have 
to remember to explicitly pass the 'do_unicode=True' parameter to this 
one particular function.

I think the alternative approach would be to use a codec, similar to how 
Unicode DNS domains are handled 
('foo@example.com'.decode('emailaddress')).

I still prefer the OO approach though, as it allows the programmer to 
treat email addresses as a standard Unicode string with a few extra 
features, such as the __cmp__ method I've since added to 
EmailAddress.py and the test suite:

>>> e = EmailAddress(u'renee@ol\u00e9.de', u'Rene\u00e9 Acut\u00e9')
>>> e == str(e)
True
>>> e == unicode(e)
True
>>> e == str(EmailAddress(e.upper()))
True
>>> e == unicode(EmailAddress(e.upper()))
True
History
Date User Action Args
2007-08-23 15:37:59adminlinkissue963906 messages
2007-08-23 15:37:59admincreate