Skip to content

Commit 4f9b70b

Browse files
authored
Merge pull request yidao620c#1 from Everfighting/Everfighting-patch-1
add python function indent
2 parents c84911b + 7d45738 commit 4f9b70b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/c06/p05_turning_dictionary_into_xml.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
from xml.etree.ElementTree import Element
1919
2020
def dict_to_xml(tag, d):
21-
'''
22-
Turn a simple dict of key/value pairs into XML
23-
'''
24-
elem = Element(tag)
25-
for key, val in d.items():
26-
child = Element(key)
27-
child.text = str(val)
28-
elem.append(child)
29-
return elem
21+
'''
22+
Turn a simple dict of key/value pairs into XML
23+
'''
24+
elem = Element(tag)
25+
for key, val in d.items():
26+
child = Element(key)
27+
child.text = str(val)
28+
elem.append(child)
29+
return elem
3030
3131
下面是一个使用例子:
3232

0 commit comments

Comments
 (0)