摘要:
Python中对于对象的赋值都是引用,而不是拷贝对象(Assignment statements in Python do not copy objects, they create bindings between a target and an object.)。对于可变对象来说,当一个改变的时 阅读全文
摘要:
最早见过手写的,类似于下面这种: 1 import datetime 2 3 def time_1(): 4 begin = datetime.datetime.now() 5 sum = 0 6 for i in xrange(10000000): 7 sum = sum + i 8 end = 阅读全文
摘要:
Migrations will run the same way on the same dataset and produce consistent results, meaning that what you see in development and staging is, under th 阅读全文
摘要:
如果两个参数不一样长,那么取短的。 也可以反向操作,见下面: 自然,也可以操作三个或者一个参数: python.org的解释: 1. This function returns a list of tuples, where the i-th tuple contains the i-th elem 阅读全文