[Python-Dev] redefining is (original) (raw)
Tim Peters tim.one at comcast.net
Thu Mar 18 14:45:24 EST 2004
- Previous message: [Python-Dev] redefining is
- Next message: [Python-Dev] Rich comparisons [Was] redefining is
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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 '==').
- Previous message: [Python-Dev] redefining is
- Next message: [Python-Dev] Rich comparisons [Was] redefining is
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]