summaryrefslogtreecommitdiffstats
path: root/Doc/tools/buildindex.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-03-21 02:11:39 (GMT)
committerCollin Winter <collinw@gmail.com>2007-03-21 02:11:39 (GMT)
commit65d09d4ee984d569424e11415f30d6af209ef558 (patch)
tree8b94fe73e8dbf38622ef2bff089310197956eb08 /Doc/tools/buildindex.py
parent89df245607619ed532106fbbdbf80745815f9c96 (diff)
downloadcpython-65d09d4ee984d569424e11415f30d6af209ef558.zip
cpython-65d09d4ee984d569424e11415f30d6af209ef558.tar.gz
cpython-65d09d4ee984d569424e11415f30d6af209ef558.tar.bz2
Run 2to3 over Doc/tools/.
Diffstat (limited to 'Doc/tools/buildindex.py')
-rwxr-xr-xDoc/tools/buildindex.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/tools/buildindex.py b/Doc/tools/buildindex.py
index 5870462..8b24cc5 100755
--- a/Doc/tools/buildindex.py
+++ b/Doc/tools/buildindex.py
@@ -37,6 +37,15 @@ class Node:
# build up the text
self.text = split_entry_text(str)
self.key = split_entry_key(str)
+
+ def __eq__(self, other):
+ return cmp(self, other) == 0
+
+ def __lt__(self, other):
+ return cmp(self, other) == -1
+
+ def __gt__(self, other):
+ return cmp(self, other) == 1
def __cmp__(self, other):
"""Comparison operator includes sequence number, for use with
@@ -380,8 +389,8 @@ def main():
sys.stderr.write("\n%s: %d index nodes" % (program, num_nodes))
else:
open(ofn, "w").write(html)
- print
- print "%s: %d index nodes" % (program, num_nodes)
+ print()
+ print("%s: %d index nodes" % (program, num_nodes))
if __name__ == "__main__":