>> +exts = [] #list of extensions for which we're checking
>
>  Why are you making exts a global variable? It should be local, there is no
> need to pollute the global name space. :-)

This change was proposed by the Alex Fernandez and I only trusted another Python expert ;-). I reverted this change now.

>> +    return copy_all(from_dir, to_dir, exts)
>
> The convention is to return 0 if all went OK, so this test could become:
>        return copy_all(from_dir, to_dir, exts) != True

Done.

>> -    return 0
>> +    return True
>
>   No, please leave it like the original way because of the above remark
> regarding conventions.

"True" is a real bool while "0" is in the first sense an integer that is treated as bool. In the other parts of the scripts we consistently use True and False instead of 0 and 1 and I prefer that to avoid misunderstandings.

>> +      return True
>> +    else:
>> +      return True
>
> The last three lines could be simplified to
>         return True

Done.

I committed the fixed version now to trunk.

Many thanks four your advices and regards
Uwe

Reply via email to