Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 20275:167e7f98b51f legacy-trunk
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 05 Oct 2001 20:41:38 +0000 |
| parents | 2269cb371e05 |
| children | b98185c882e4 |
line wrap: on
line diff
--- a/Python/ceval.c Fri Oct 05 20:40:48 2001 +0000 +++ b/Python/ceval.c Fri Oct 05 20:41:38 2001 +0000 @@ -989,7 +989,7 @@ case BINARY_SUBSCR: w = POP(); v = POP(); - if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) { + if (PyList_CheckExact(v) && PyInt_CheckExact(w)) { /* INLINE: list[int] */ long i = PyInt_AsLong(w); if (i < 0)
