Patchwork [2,of,3,py3] hgmanpage: use range instead of xrange

login
register
mail settings
Submitter Philippe Pepiot
Date April 4, 2019, 5:09 p.m.
Message ID <1cfe2d1794ee65647bc9.1554397792@euler.in.philpep.org>
Download mbox | patch
Permalink /patch/39480/
State Accepted
Headers show

Comments

Philippe Pepiot - April 4, 2019, 5:09 p.m.
# HG changeset patch
# User Philippe Pepiot <philippe.pepiot@logilab.fr>
# Date 1554397685 -7200
#      Thu Apr 04 19:08:05 2019 +0200
# Node ID 1cfe2d1794ee65647bc95615e5d032cc6e54352c
# Parent  c9030c811fdff71908344bb17f05bb71d314acc7
[py3] hgmanpage: use range instead of xrange

Patch

diff --git a/doc/hgmanpage.py b/doc/hgmanpage.py
--- a/doc/hgmanpage.py
+++ b/doc/hgmanpage.py
@@ -263,7 +263,7 @@  class Translator(nodes.NodeVisitor):
             # ensure we get a ".TH" as viewers require it.
             self.head.append(self.header())
         # filter body
-        for i in xrange(len(self.body) - 1, 0, -1):
+        for i in range(len(self.body) - 1, 0, -1):
             # remove superfluous vertical gaps.
             if self.body[i] == '.sp\n':
                 if self.body[i - 1][:4] in ('.BI ','.IP '):