The first call to test has the file_list empty but on the second call to test the file_list is no longer empty but contains the values appended in the first call.
Is this correct behavior? I'm using python 2.5 def test(param_1, file_list = []): if len(file_list) == 0: print "Empty list" file_list.append("list item 1") file_list.append("list item 2") else: raise if __name__ == "__main__": test(1) test(2)
-- http://mail.python.org/mailman/listinfo/python-list