summaryrefslogtreecommitdiffstats
path: root/Tools/clinic
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-07-28 18:10:45 (GMT)
committerGitHub <noreply@github.com>2023-07-28 18:10:45 (GMT)
commitecc05e23a1f4086645cfb5362c4c1351f70a4eb1 (patch)
treeefadb6c91e4aef09fbaefb4c6b0942c66b7f6169 /Tools/clinic
parent3a1d819ebc36189e086198212822c9b29384f242 (diff)
downloadcpython-ecc05e23a1f4086645cfb5362c4c1351f70a4eb1.zip
cpython-ecc05e23a1f4086645cfb5362c4c1351f70a4eb1.tar.gz
cpython-ecc05e23a1f4086645cfb5362c4c1351f70a4eb1.tar.bz2
gh-106368: Argument clinic: Fix minor bug in `state_modulename_name` (#107387)
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-xTools/clinic/clinic.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index a343dc5..39c6de3 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -4707,11 +4707,9 @@ class DSLParser:
if existing_function.name == function_name:
break
else:
- existing_function = None
- if not existing_function:
- print("class", cls, "module", module, "existing", existing)
- print("cls. functions", cls.functions)
- fail("Couldn't find existing function " + repr(existing) + "!")
+ print(f"{cls=}, {module=}, {existing=}")
+ print(f"{(cls or module).functions=}")
+ fail(f"Couldn't find existing function {existing!r}!")
fields = [x.strip() for x in full_name.split('.')]
function_name = fields.pop()