Rich Comparisons Gotcha
steven at REMOVE.THIS.cybersource.com.au
Wed Jan 7 10:26:47 CET 2009
On Wed, 07 Jan 2009 01:23:19 +0000, Mark Wooding wrote:
> A case-sensitive string is /not the same/ as a case-insensitive string.
> One's a duck, the other's a goose. I'd claim here that i"abc" =~ "ABC"
> must be False, because i"abc" =~ "abc" must be false also! To define it
> otherwise leads to the incoherence you describe.
It's only incoherent if you need equality to be an equivalence relation.
If you don't, it is perfectly reasonable to declare that i"abc" equals
More information about the Python-list