Skip to content

Commit b6785c4

Browse files
committed
revert to len()
1 parent b051ae8 commit b6785c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tools/clinic/libclinic/parse_args.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def declare_parser(
3434
fname = '.fname = "{name}",'
3535
format_ = ''
3636

37-
num_keywords = sum(
38-
1 for p in f.parameters.values()
37+
num_keywords = len([
38+
p for p in f.parameters.values()
3939
if not p.is_positional_only() and not (p.is_vararg() or p.is_var_keyword())
40-
)
40+
])
4141

4242
condition = '#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)'
4343
if limited_capi:

0 commit comments

Comments
 (0)