Aug-05-2018, 11:33 PM
the all() and any() functions test all the elements of the given iterator (list, etc) to see if all/any of those elements are True. my suggested change is to support one or more optional additional arguments. then the logic is to test if all/any of the elements of the iterator given in the first argument is equal to any of the remaining arguments. if there is only one argument, the original logic is performed. if two arguments are given, where the 2nd argument is True, theses functions act similar to the way if only one argument is given, but the test is for exactly the value True. IOW, the default for the remaining arguments, if none are, given, is the generalized test for truthfulness (the original logic).
discussion?
* Skaperen ducks his head!
discussion?
* Skaperen ducks his head!
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.