"Warren Stringer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message | > news:[EMAIL PROTECTED] | > || Warren Stringer wanted to call the functions just for the side effects | > | without interest in the return values. So building a list of return | > | values which is immediately thrown away is a waste of time and memory. | > | > Also unnecessary: for f in callables: f() | | What do you mean?
That if you want to call each of a sequence of proceedures (functions without a meaning return), as you have indicated and do so again, then the above is the simple, direct way to do so. Using 'c' instead of 'callables', as in the subject line, would reduce the number of characters [snip] | It sounds like list comprehension may be slower because it builds a list | that never gets used. A list comprenhension is for building a list that will be used. | I'm curious if eval statements are faster than def | statements? Any bytecode experts? Eval expressions (not statements) and def statements do different things and hence comparing their speed make no sense to me. In any case, speed comparisions that you really care about are best done on a particular target system. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list