代码缩进错误

This commit is contained in:
ding
2016-06-22 13:14:59 +08:00
parent 26f70df84e
commit 0997e5da9e

View File

@@ -69,7 +69,7 @@
total = 0.0
for rec in records:
s = Stock(*rec)
total += s.shares * s.price
total += s.shares * s.price
return total
----------
@@ -131,4 +131,3 @@
最后要说的是,如果你的目标是定义一个需要更新很多实例属性的高效数据结构,那么命名元组并不是你的最佳选择。
这时候你应该考虑定义一个包含 ``__slots__`` 方法的类(参考8.4小节)。