diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 08:17:07 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2012-05-27 08:17:07 (GMT) |
commit | 0b43bcf5287d9494e3332b391350fcd32fe93f2c (patch) | |
tree | 4afedcf7ea32b14bb3c9a46fb8fd9532e9344bd0 /Objects | |
parent | 5c6eba3a93ce5fe989e372a8b12f535c72fc4e8f (diff) | |
download | cpython-0b43bcf5287d9494e3332b391350fcd32fe93f2c.zip cpython-0b43bcf5287d9494e3332b391350fcd32fe93f2c.tar.gz cpython-0b43bcf5287d9494e3332b391350fcd32fe93f2c.tar.bz2 |
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 cb4b99b..872ed99 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]; |