Skip to content

Commit 0997e5d

Browse files
committed
代码缩进错误
1 parent 26f70df commit 0997e5d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/c01/p18_map_names_to_sequence_elements.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
total = 0.0
7070
for rec in records:
7171
s = Stock(*rec)
72-
total += s.shares * s.price
72+
total += s.shares * s.price
7373
return total
7474
7575
----------
@@ -131,4 +131,3 @@
131131
132132
最后要说的是,如果你的目标是定义一个需要更新很多实例属性的高效数据结构,那么命名元组并不是你的最佳选择。
133133
这时候你应该考虑定义一个包含 ``__slots__`` 方法的类(参考8.4小节)。
134-

0 commit comments

Comments
 (0)