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:
Nick Coghlan 2012-05-27 18:17:07 +10:00
parent 5c6eba3a93
commit 0b43bcf528
7 changed files with 45 additions and 17 deletions

View file

@ -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;