diff options
| author | Collin Winter <collinw@gmail.com> | 2007-03-21 02:11:39 (GMT) |
|---|---|---|
| committer | Collin Winter <collinw@gmail.com> | 2007-03-21 02:11:39 (GMT) |
| commit | 65d09d4ee984d569424e11415f30d6af209ef558 (patch) | |
| tree | 8b94fe73e8dbf38622ef2bff089310197956eb08 /Doc/tools/buildindex.py | |
| parent | 89df245607619ed532106fbbdbf80745815f9c96 (diff) | |
| download | cpython-65d09d4ee984d569424e11415f30d6af209ef558.zip cpython-65d09d4ee984d569424e11415f30d6af209ef558.tar.gz cpython-65d09d4ee984d569424e11415f30d6af209ef558.tar.bz2 | |
Run 2to3 over Doc/tools/.
Diffstat (limited to 'Doc/tools/buildindex.py')
| -rwxr-xr-x | Doc/tools/buildindex.py | 13 |
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__": |
