On Fri, 11 Mar 2005 11:30:38 +0100, BJörn Lindqvist <[EMAIL PROTECTED]> wrote: > Not sure this is pertinent but anyway: "any" and "all" are often used > as variable names. "all" especially often and then almost always as a > list of something. It would not be good to add "all" to the list of > words to watch out for. Also, "all" is usually thought of as a list of > (all) things. In my mind it doesn't make sense (yet) that all(seq) > returns true if all elements of seq is true and false otherwise, I > would have expected "all" to return a list. "any" is better because it > is very obvious it can only return one thing.
Using "any" and "all" as variables hides the builtins, but doesn't disallow their use elsewhere. Personally, though, I wouldn't use "any" or "all" as variable names, so that's a style issue. As far as the names making sense is concerned, they are perfect in context: if all(i > 0 for i in int_list): if any(invalid(s) for s in input_values): While you may think that use in any other context looks a little less natural (something I'm not convinced of), in the intended context, the names seem ideal to me. Paul. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com