def format_parameter_name(self, node, parameter):
# Force "self" for the first parameter of a method
- if self.is_method(node) and parameter is node.parameters[0]:
+ if self.is_method(node) and parameter is node.instance_parameter:
return "self"
else:
return parameter.argname
<p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj"/> that was
created with <link xref="DocExamples.Obj.new"/>, by passing it
-in as <code>obj</code>.</p><p>This should be a %FALSEALARM.</p>
+in as <code>self</code>.</p><p>This should be a %FALSEALARM.</p>
<p>Since 0.99</p>
<dt><p>boolean_arg :</p></dt>
<dd><p>You should always pass <code>True</code>.</p></dd>
<dt><p>pointer_arg :</p></dt>
-<dd><p>If not <code>None</code>, do a thing. Pass <code>self</code> if you want to sometimes. You can also pass <code>second_arg</code>, or even <code>boolean_arg</code>.</p></dd>
+<dd><p>If not <code>None</code>, do a thing. Pass <code>first_arg</code> if you want to sometimes. You can also pass <code>second_arg</code>, or even <code>boolean_arg</code>.</p></dd>
<dt><p>string :</p></dt>
<dd><p>A NUL-terminated string.</p></dd>
<dt><p>Returns :</p></dt>