What is the difference between
for i in range(0,3): print cons[i]['fun'](x0)
and
for f in cons: print f['fun'](x0)
where cons is defined as following
A = np.asmatrix([[1,0,0],[0,1,0],[0,0,1]])
x0 = np.asarray([1,2,0])
cons = list()
for i in range(0,3): cons.append({'fun':lambda x: np.dot(A[i],x)})