diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 18:17:07 +1000 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 18:17:07 +1000 |
commit | e26eba13bcc570d5e912886692d5030db7b74ac3 (patch) | |
tree | 99be6af20ea17cd7a7e9dd1a7feaf6874c7879e7 /Objects | |
parent | 3317d8ab64adb4e11a9f3d136f08cb35ccf35b5b (diff) | |
download | cpython-e26eba13bcc570d5e912886692d5030db7b74ac3.tar.gz |
Close #14857: fix regression in references to PEP 3135 implicit __class__ closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index cb4b99b493..872ed99568 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -6436,7 +6436,7 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds) PyObject *name = PyTuple_GET_ITEM(co->co_freevars, i); assert(PyUnicode_Check(name)); if (!PyUnicode_CompareWithASCIIString(name, - "@__class__")) { + "__class__")) { Py_ssize_t index = co->co_nlocals + PyTuple_GET_SIZE(co->co_cellvars) + i; PyObject *cell = f->f_localsplus[index]; |