Is 'everything' a refrence or isn't it?
David Murmann
david.murmann at rwth-aachen.de
Thu Jan 5 07:56:18 EST 2006
Ich schrieb:
> well, as far as i can see the relevant function is
> in Objects/intobject.c, which does compare by value. so, this is
> either special-cased elsewhere or not optimized (should/can it be?).
it is special-cased, but still compares by value. the relevant
parts from "Python/ceval.c":
case COMPARE_OP:
if (PyInt_CheckExact(w) && PyInt_CheckExact(v)) {
a = PyInt_AS_LONG(v);
b = PyInt_AS_LONG(w);
switch (oparg) {
case PyCmp_EQ: res = a == b; break;
}
}
sorry if i am being noisy.
--
David.
More information about the Python-list
mailing list