It is not a good idea to have mutable values (i.e. empty list) as the default parameter value because Python does not create a new empty list for you every time you create an object. Instead, it creates it only once and then, it will reference to the same list every time so the next time you create an Experiment object, it is possible that a non-empty list is passed to the function.
I suggest to replace the square brackets by "None". And then, inside the function
if report_kpi_names is None:
report_kpi_names = list()
In that case, it can guarantee an empty list for the function.
In the class expan.core.experiment.Experiment, the constructor starts with the following:
def init(self, control_variant_name, data, metadata, report_kpi_names=[], derived_kpis=[]):
It is not a good idea to have mutable values (i.e. empty list) as the default parameter value because Python does not create a new empty list for you every time you create an object. Instead, it creates it only once and then, it will reference to the same list every time so the next time you create an Experiment object, it is possible that a non-empty list is passed to the function.
I suggest to replace the square brackets by "None". And then, inside the function if report_kpi_names is None: report_kpi_names = list()
In that case, it can guarantee an empty list for the function.
Details of this problem can be found: http://docs.python-guide.org/en/latest/writing/gotchas/