Issue #20390: Final fix, for generating NoPositional/NoKeyword for __init__ calls.
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 184bb39..f3fe3c1 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -2593,11 +2593,21 @@
     def set_template_dict(self, template_dict):
         template_dict['self_name'] = self.name
         template_dict['self_type'] = self.parser_type
-        if ((self.function.kind == METHOD_NEW) and
-            self.function.cls and
-            self.function.cls.typedef):
-            template_dict['self_type_object'] = self.function.cls.type_object
-            template_dict['self_type_check'] = '({self_name} == {self_type_object}) &&\n        '.format_map(template_dict)
+        kind = self.function.kind
+        cls = self.function.cls
+
+        if ((kind in (METHOD_NEW, METHOD_INIT)) and cls and cls.typedef):
+            if kind == METHOD_NEW:
+                passed_in_type = self.name
+            else:
+                passed_in_type = 'Py_TYPE({})'.format(self.name)
+
+            line = '({passed_in_type} == {type_object}) &&\n        '
+            d = {
+                'type_object': self.function.cls.type_object,
+                'passed_in_type': passed_in_type
+                }
+            template_dict['self_type_check'] = line.format_map(d)