Function factory?

Thomas Jollans tjol at tjol.eu
Wed Oct 24 06:30:44 EDT 2018


On 2018-10-24 10:58, ftg at lutix.org wrote:
>     if check_file(path,file_name):
>         return True
>     else:
>         return False

Replace this with a simple

    return check_file(path, file_name)

and now your functions share one line, and one that simply calls another
function at that.




More information about the Python-list mailing list