• James Hamm's avatar
    Replace endswith calls in a loop with a single endswith call (#832) · f566fac8
    James Hamm authored
    str.endswith can take a single string, or a tuple of strings. This replaces a loop over each extension and a call to endswith with a single call to endswith passing in all the allowed extensions. This has the advantage that the loop over each extension is done in c rather than python, and the code is a little less verbose.
    f566fac8
folder.py 6.84 KB