Dec-21-2018, 05:23 AM
what if, in the future, there are new exceptions added that os.listdir() might produce? i can only imagine that they, too, would be subclasses of OSError. so it might be good to have some, but not too much, breadth of scope, catching those errors. so in this case, catching OSError sounds like a reasonable idea.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.