On Sat, Jan 9, 2010 at 8:03 AM, spir <denis.s...@free.fr> wrote: > Do you realize the inner func will be redefined before each call? Meaning in > your case n calls x n outer loops x n inner loops. > def f() ... > is actually a kind of masked assignment > f = function()...
That's true, but it is pretty inexpensive. The heavy lifting is at compile time when a code object is created. Wrapping this as a function is fast. Kent _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor