summaryrefslogtreecommitdiff
path: root/giscanner/doctemplates/Python/function.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/doctemplates/Python/function.tmpl')
-rw-r--r--giscanner/doctemplates/Python/function.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/doctemplates/Python/function.tmpl b/giscanner/doctemplates/Python/function.tmpl
index fa705bd0..23fde041 100644
--- a/giscanner/doctemplates/Python/function.tmpl
+++ b/giscanner/doctemplates/Python/function.tmpl
@@ -24,7 +24,7 @@
</%block>
<%block name="synopsis">
<synopsis><code mime="text/x-python">
-% if len(node.all_parameters) != 0:
+% if node.all_parameters:
@accepts(\
${', '.join((formatter.format_type(arg.type) for arg in node.all_parameters))}\
)
@@ -40,7 +40,7 @@ ${', '.join((formatter.format_parameter_name(node, arg) for arg in node.all_para
<%block name="details">
% if node.all_parameters or node.retval:
<dl>
-% for arg, ix in zip(node.all_parameters, range(len(node.all_parameters))):
+% for ix, arg in enumerate(node.all_parameters):
<dt><p>${formatter.format_parameter_name(node, arg)} :</p></dt>
<dd>${formatter.format(node, arg.doc)}</dd>
% endfor