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/sgmlconv/esis2sgml.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/sgmlconv/esis2sgml.py')
-rwxr-xr-x | Doc/tools/sgmlconv/esis2sgml.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Doc/tools/sgmlconv/esis2sgml.py b/Doc/tools/sgmlconv/esis2sgml.py index 81294d1..10ec83a 100755 --- a/Doc/tools/sgmlconv/esis2sgml.py +++ b/Doc/tools/sgmlconv/esis2sgml.py @@ -44,8 +44,7 @@ def null_map_gi(sgmlgi, map): def format_attrs(attrs, xml=0): - attrs = attrs.items() - attrs.sort() + attrs = sorted(attrs.items()) parts = [] append = parts.append for name, value in attrs: @@ -149,7 +148,7 @@ def convert(ifp, ofp, xml=0, autoclose=(), verbatims=()): ofp.write("&%s;" % data) knownempty = 0 else: - raise RuntimeError, "unrecognized ESIS event type: '%s'" % type + raise RuntimeError("unrecognized ESIS event type: '%s'" % type) if LIST_EMPTIES: dump_empty_element_names(knownempties) @@ -170,8 +169,7 @@ def dump_empty_element_names(knownempties): if gi: d[gi] = gi fp = open(EMPTIES_FILENAME, "w") - gilist = d.keys() - gilist.sort() + gilist = sorted(d.keys()) fp.write("\n".join(gilist)) fp.write("\n") fp.close() |