python_L7

1. print 是调试时的有用工具

2. aliasing bug:

 1 # x is a list
 2 temp = x
 3 temp.inverse()
 4 """
 5 调用temp.inverse()时 也会改变x的值 
 6 相当于同时调用了x.inverse()
 7 因为 temp和x指向了同一个对象
 8 
 9 """
10 #right version
11 temp = x[:]  # make a copy of x
原文地址:https://www.cnblogs.com/njuzwr/p/4513820.html