[issue1997] unicode and string compare should not cause an exception

2008-02-02 Thread Guido van Rossum
Guido van Rossum added the comment: You should be grateful. :-) The error points out a bug in your program: you're mixing encoded and unencoded text. __ Tracker <[EMAIL PROTECTED]> __

[issue1997] unicode and string compare should not cause an exception

2008-02-02 Thread Guido van Rossum
Changes by Guido van Rossum: Removed file: http://bugs.python.org/file9348/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1997] unicode and string compare should not cause an exception

2008-02-02 Thread Aaron Watters
Aaron Watters added the comment: Okay. I haven't looked but this should be well documented somewhere because I found it very surprising (it crashed a large run somewhere in the middle). In the case of strings versus unicode I think it is possible to hack around this by catching the exceptional

[issue1997] unicode and string compare should not cause an exception

2008-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: > As I understand it comparisons between two objects should > always work. Hi Aaron! Glad to see you're back. It used to be that way when you & Jim wrote the first Python book. :-) Nowadays, comparisons *can* raise exceptions. Marc-Andre has explained why.

[issue1997] unicode and string compare should not cause an exception

2008-02-01 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The change we did was for == and != comparisons to always work (they now "raise" warnings) - mostly because doing otherwise resulted in strange exceptions when dealing with dictionary lookups. However, this was not done for comparisons <, <=, >=, > since th

[issue1997] unicode and string compare should not cause an exception

2008-02-01 Thread Aaron Watters
New submission from Aaron Watters: As I understand it comparisons between two objects should always work. I get this at the interpreter prompt: Python 2.6a0 (trunk, Jan 11 2008, 11:40:59) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 Type "help", "copyright", "credits" or "license" for more