Hi Collin, > This patch explains the random tests/ directory that gnulib-tool.py > makes with the Emacs script. I've tried to make this patch match the > shell code.
Thanks! Applied. > Also, I've noticed that some functions check if a type(var) == list. > To avoid problems I've returned an empty list instead of None. Yes, generally there is no reason to "optimize" an empty list into None. None really has the meaning "not applicable" rather than "empty list". One question: Why this change? - tests_modules = sorted(set(tests_modules)) + tests_modules = sorted(list(set(tests_modules))) IMO, it is redundant, because sorted() of a set returns a list anyway. >>> x = ["a", "c", "b", "d", "b"] >>> sorted(x) ['a', 'b', 'b', 'c', 'd'] >>> sorted(set(x)) ['a', 'b', 'c', 'd'] >>> sorted(list(set(x))) ['a', 'b', 'c', 'd'] >>> x = None >>> sorted(x) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not iterable >>> sorted(set(x)) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not iterable >>> sorted(list(set(x))) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not iterable Bruno