Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 6139:a287c5014e66 legacy-trunk
Reverse the search order for the Don Beaudry hook so that the first
class wins. Makes more sense.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 22 Aug 1997 16:56:16 +0000 |
| parents | 5a4d181ffffd |
| children | b76a44163e0f |
line wrap: on
line diff
--- a/Python/ceval.c Fri Aug 22 13:51:31 1997 +0000 +++ b/Python/ceval.c Fri Aug 22 16:56:16 1997 +0000 @@ -2683,7 +2683,7 @@ PyObject *bases; /* tuple containing classes */ PyObject *name; /* string */ { - int i; + int i, n; if (!PyTuple_Check(bases)) { PyErr_SetString(PyExc_SystemError, "build_class with non-tuple bases"); @@ -2699,9 +2699,8 @@ "build_class witn non-string name"); return NULL; } - for (i = PyTuple_Size(bases); --i >= 0; ) { - /* XXX Is it intentional that the *last* base gets a - chance at this first? */ + n = PyTuple_Size(bases); + for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(bases, i); if (!PyClass_Check(base)) { /* Call the base's *type*, if it is callable.
