Skip to content

Commit f26be39

Browse files
authored
Merge pull request yidao620c#313 from Everfighting/master
add python function indent
2 parents 511c0b4 + a8ecf6e commit f26be39

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
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

source/c07/p04_return_multiple_values_from_function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.. code-block:: python
1616
1717
>>> def myfun():
18-
... return 1, 2, 3
18+
... return 1, 2, 3
1919
...
2020
>>> a, b, c = myfun()
2121
>>> a

0 commit comments

Comments
 (0)