Re: Callback scoping

2007-07-05 Thread Nick Craig-Wood
Dan <[EMAIL PROTECTED]> wrote: > So, I think I understand what python's scoping is doing in the > following situation: > >>> x = [ lambda: ind for ind in range(10) ] > > But, I'm wondering what is the easiest (and/or most pythonic) way to > get the behavior I want? (If you haven't guessed, I w

Re: Callback scoping

2007-07-05 Thread Marc 'BlackJack' Rintsch
On Thu, 05 Jul 2007 19:14:07 +, Dan wrote: > So, I think I understand what python's scoping is doing in the > following situation: x = [ lambda: ind for ind in range(10) ] > > […] > > But, I'm wondering what is the easiest (and/or most pythonic) way to > get the behavior I want? (If you