To: Bart From: Gregory Ewing <greg.ew...@canterbury.ac.nz> Bart wrote: > Wow. (Just think of all the times you write a function containing a neat > bunch of local functions, every time it's called it has to create a new > function instances for each of those functions, even if they are not used.)
Fortunately, function objects are small and cheap, essentially just a couple of object references. The overhead of creating one is probably about the same as creating an empty list. If your function is complicated enough to benefit from local functions, the cost is going to be swamped by the rest of the work being done. -- Greg --- BBBS/Li6 v4.10 Toy-3 * Origin: Prism bbs (1:261/38) -- https://mail.python.org/mailman/listinfo/python-list