1 parent 26f70df commit 0997e5dCopy full SHA for 0997e5d
1 file changed
source/c01/p18_map_names_to_sequence_elements.rst
@@ -69,7 +69,7 @@
69
total = 0.0
70
for rec in records:
71
s = Stock(*rec)
72
- total += s.shares * s.price
+ total += s.shares * s.price
73
return total
74
75
----------
@@ -131,4 +131,3 @@
131
132
最后要说的是,如果你的目标是定义一个需要更新很多实例属性的高效数据结构,那么命名元组并不是你的最佳选择。
133
这时候你应该考虑定义一个包含 ``__slots__`` 方法的类(参考8.4小节)。
134
-
0 commit comments