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

Skip to content

Commit 2314a04

Browse files
committed
Use string methods. Re-organize imports to Python Normal Form.
1 parent 27c4e09 commit 2314a04

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Doc/tools/sgmlconv/esis2sgml.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
# generated from an SGML or an XML application.
1111

1212
import errno
13-
import esistools
1413
import os
1514
import re
1615
import string
1716

1817
from xml.sax.saxutils import escape
1918

19+
import esistools
20+
2021

2122
AUTOCLOSE = ()
2223

@@ -63,7 +64,7 @@ def format_attrs(attrs, xml=0):
6364
append('%s="%s"' % (name, escape(value)))
6465
if parts:
6566
parts.insert(0, '')
66-
return string.join(parts)
67+
return " ".join(parts)
6768

6869

6970
_nmtoken_rx = re.compile("[a-z][-._a-z0-9]*$", re.IGNORECASE)
@@ -171,7 +172,7 @@ def dump_empty_element_names(knownempties):
171172
fp = open(EMPTIES_FILENAME, "w")
172173
gilist = d.keys()
173174
gilist.sort()
174-
fp.write(string.join(gilist, "\n"))
175+
fp.write("\n".join(gilist))
175176
fp.write("\n")
176177
fp.close()
177178

0 commit comments

Comments
 (0)