Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 41008:891c28d53569 2.5
Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
(backport from rev. 54139)
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 05 Mar 2007 22:28:13 +0000 |
| parents | 83088ad83a6b |
| children | 08d16183a9c1 |
line wrap: on
line diff
--- a/Python/ceval.c Sun Mar 04 17:19:02 2007 +0000 +++ b/Python/ceval.c Mon Mar 05 22:28:13 2007 +0000 @@ -3926,7 +3926,7 @@ PyTypeObject *tp = u->ob_type; PySequenceMethods *sq = tp->tp_as_sequence; - if (sq && sq->sq_slice && ISINDEX(v) && ISINDEX(w)) { + if (sq && sq->sq_ass_slice && ISINDEX(v) && ISINDEX(w)) { Py_ssize_t ilow = 0, ihigh = PY_SSIZE_T_MAX; if (!_PyEval_SliceIndex(v, &ilow)) return -1;
