i have a function to test if multiple items all meet a certain condition. another function is to test if multiple items all fail to meet a certain condition. two more functions do these tests if any item (one or more) meets, or fails to meet, a certain condition. what the condition is, is fixed. for a different condition, there would be four more functions. the items are passed in a list or tuple. the return value is a boolean, True or False. if any item type does not make sense (such as passing an int when the condition being tested is if a character is an English vowel) an exception is raised (such as TypeError).
if the passed list (or tuple) is empty, should this function raise an exception or return some value? which exception? there seems to be no EmptyListError. i'd like to be sure any exception raised applies only one way or the other so the nature of the error is clear.
if the passed list (or tuple) is empty, should this function raise an exception or return some value? which exception? there seems to be no EmptyListError. i'd like to be sure any exception raised applies only one way or the other so the nature of the error is clear.
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.