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 lemburg
Recipients
Date 2006-08-11.21:09:53
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The attached patch is a first version of the change
discussed on python-dev this and last week:

It replaces UnicodeDecodeErrors raised during == and !=
compares of Unicode and other objects with a new
UnicodeWarning.

All other comparisons continue to raise exceptions.
Exceptions other than UnicodeDecodeErrors are also left
untouched.

The documentation part of the patch is still
incomplete. Suggestions are welcome.

Due to the change to only the == and != comparison
operators, Unicode objects had to grow an
implementation for rich comparisons (which now replaces
the old tp_compare slot).

Tests all pass.

Aside:

During testing I found that the warning registry
defaults to only issueing warnings once per module and
line number. I suppose this is enough for debugging
code, but it feels weird when trying things in the
interactive session, as you only get the warnings once
in that context (and for the whole session), regardless
of the fact that you're entereing new lines of code all
the time.

Maybe something to change for Python 2.6.
History
Date User Action Args
2007-08-23 15:54:05adminlinkissue1538956 messages
2007-08-23 15:54:05admincreate