Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06912b7

Browse files
committed
Use string methods. Organize the imports in Python Normal Form.
1 parent 4fe904d commit 06912b7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/tools/mkmodindex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Supported options:
2525
--uptitle str Set the upward link title. The default is 'Python
2626
Documentation Index'.
2727
"""
28-
import buildindex
2928
import os
3029
import re
31-
import string
32-
import support
3330
import sys
3431

32+
import buildindex
33+
import support
34+
3535

3636
class IndexOptions(support.Options):
3737
aesop_type = "links"
@@ -119,10 +119,10 @@ def main():
119119
]
120120
if has_plat_flag:
121121
parts.insert(1, PLAT_DISCUSS)
122-
html = string.join(parts, '')
122+
html = ''.join(parts)
123123
program = os.path.basename(sys.argv[0])
124124
fp = options.get_output_file()
125-
fp.write(string.rstrip(html) + "\n")
125+
fp.write(html.rstrip() + "\n")
126126
if options.outputfile == "-":
127127
sys.stderr.write("%s: %d index nodes\n" % (program, num_nodes))
128128
else:

0 commit comments

Comments
 (0)