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 a1713bd commit 3212337Copy full SHA for 3212337
1 file changed
Python/compile.c
@@ -551,6 +551,16 @@ compiler_exit_scope(struct compiler *c)
551
552
}
553
554
+/* Allocate a new "anonymous" local variable. Used by with statements. */
555
+
556
+static PyObject *
557
+compiler_new_tmpname(struct compiler *c)
558
+{
559
+ char tmpname[256];
560
+ PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", ++c->u->u_tmpname);
561
+ return PyUnicode_FromString(tmpname);
562
+}
563
564
/* Allocate a new block and return a pointer to it.
565
Returns NULL on error.
566
*/
0 commit comments