View Full Version : variable parameter value In Python

06-05-2013, 07:53 PM
Don't use a mutable object as a function of the default parameters,such as list,dict and so on, because def is an executable statement, only def execution when calculating the default default parameter values, so when using the default parameters can cause function have been using the same object, caused by a bug.