Mercurial > cpython-lru_cache-weakref
diff Objects/typeobject.c @ 49775:2ca964d724d5
Fix for bug 4360 "SystemError when method has both super() & closure". Patch
by amaury.forgeotdarc and reviewed by brett.cannon.
Also add release notes about the known problems with the email package.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Thu, 20 Nov 2008 20:01:57 +0000 |
| parents | 356c3e18da5e |
| children | 0496963fcfe9 |
line wrap: on
line diff
--- a/Objects/typeobject.c Thu Nov 20 16:21:55 2008 +0000 +++ b/Objects/typeobject.c Thu Nov 20 20:01:57 2008 +0000 @@ -6170,8 +6170,9 @@ assert(PyUnicode_Check(name)); if (!PyUnicode_CompareWithASCIIString(name, "__class__")) { - PyObject *cell = - f->f_localsplus[co->co_nlocals + i]; + Py_ssize_t index = co->co_nlocals + + PyTuple_GET_SIZE(co->co_cellvars) + i; + PyObject *cell = f->f_localsplus[index]; if (cell == NULL || !PyCell_Check(cell)) { PyErr_SetString(PyExc_SystemError, "super(): bad __class__ cell");
