Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ff077b commit fe2236fCopy full SHA for fe2236f
1 file changed
Python/compile.c
@@ -1779,6 +1779,13 @@ com_global_stmt(c, n)
1779
/* 'global' NAME (',' NAME)* */
1780
for (i = 1; i < NCH(n); i += 2) {
1781
char *s = STR(CHILD(n, i));
1782
+#ifdef PRIVATE_NAME_MANGLING
1783
+ char buffer[256];
1784
+ if (s != NULL && s[0] == '_' && s[1] == '_' &&
1785
+ c->c_private != NULL &&
1786
+ com_mangle(c, s, buffer, (int)sizeof(buffer)))
1787
+ s = buffer;
1788
+#endif
1789
if (dictlookup(c->c_locals, s) != NULL) {
1790
err_setstr(SyntaxError, "name is local and global");
1791
c->c_errors++;
0 commit comments