[Guido] > ... > (The best scheme is probably to use intern() but still use '==' for > comparisons; '==' is smart enough to skip comparing an object to > itself.) Well, string_richcompare() takes that shortcut, so the advice is good, but PyObject_RichCompare() doesn't in general (PyObject_Compare() still does, but that's not triggered by '==').