summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-03-03 06:02:59 (GMT)
committerGitHub <noreply@github.com>2022-03-03 06:02:59 (GMT)
commitfa8c5ed9c80507670c756aa83ea872b8a92bcd1c (patch)
tree3a8d1db90d6c9e5444a0977b991dee8b64f9048a /Python
parent257f5be7f7fad37d0db6c145e534e5b7289d8804 (diff)
downloadcpython-fa8c5ed9c80507670c756aa83ea872b8a92bcd1c.zip
cpython-fa8c5ed9c80507670c756aa83ea872b8a92bcd1c.tar.gz
cpython-fa8c5ed9c80507670c756aa83ea872b8a92bcd1c.tar.bz2
bpo-46831: Update __build_class__ comment (GH-31522)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 81d968b7c30d5b41f3f28b297b7ee5345d569509) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 1416eb1..f012406 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2440,9 +2440,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