]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46831: Update __build_class__ comment (#31522)
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Thu, 3 Mar 2022 05:32:57 +0000 (21:32 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Mar 2022 05:32:57 +0000 (21:32 -0800)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Python/compile.c

index 3609ff8f4fb9e5dec66eb933f64ab749b49c7c36..14595d9b576f5d2e7a9b9b8fb731be8f847e6545 100644 (file)
@@ -2604,9 +2604,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