On 2012-09-04 at 02:17:30 +0000, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote:
> Besides, then somebody will say "Yes, but what about the cases where > the prefix and the suffix are both equal, but the middle will be > different?" and propose a third string-equality operator ==== and > then there will be bloodshed. Lisp has several equality forms, although they're for different kinds or levels of equality rather than for different algorithms for determining that equality. I imagine that a discussion similar to this one spawned many of those forms. I agree with Steven: decisions such as this belong to the application developer, not the standard library. Don't forget the fourth string-equality operator for case-insensitive comparisons and the fifth string-equality operator for strings that are likely to be palindromes. That said, if I really wanted bloodshed, I would propose = for the third string-equality operator! ;-) Dan -- http://mail.python.org/mailman/listinfo/python-list