]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46831: Update __build_class__ comment (GH-31522)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 3 Mar 2022 05:59:57 +0000 (21:59 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 05:59:57 +0000 (21:59 -0800)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 81d968b7c30d5b41f3f28b297b7ee5345d569509)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Python/compile.c

index f426050ccef5bce2212c366d3cc9150769a8b6fe..28003b66bd4e6bc5637294a8c109918333747c5a 100644 (file)
@@ -2319,9 +2319,8 @@ compiler_class(struct compiler *c, stmt_ty s)
     /* ultimately generate code for:
          <name> = __build_class__(<func>, <name>, *<bases>, **<keywords>)
        where:
-         <func> is a function/closure created from the class body;
-            it has a single argument (__locals__) where the dict
-            (or MutableSequence) representing the locals is passed
+         <func> is a zero arg function/closure created from the class body.
+            It mutates its locals to build the class namespace.
          <name> is the class name
          <bases> is the positional arguments and *varargs argument
          <keywords> is the keyword arguments and **kwds argument