mirror of
https://github.com/python/cpython.git
synced 2025-07-17 16:25:18 +00:00
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
This commit is contained in:
parent
5c6eba3a93
commit
0b43bcf528
7 changed files with 45 additions and 17 deletions
|
@ -1676,7 +1676,7 @@ compiler_class(struct compiler *c, stmt_ty s)
|
|||
return 0;
|
||||
}
|
||||
/* return the (empty) __class__ cell */
|
||||
str = PyUnicode_InternFromString("@__class__");
|
||||
str = PyUnicode_InternFromString("__class__");
|
||||
if (str == NULL) {
|
||||
compiler_exit_scope(c);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue