Re: python newbie - question about lexical scoping

2007-12-02 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : (snip) > class Foo(object): > bar = {'baz':'bing'} > def __init__(self): > self.bar = self.bar Hem... Should re-read before posting :( It's of course: def __init__(self): self.bar = self.bar.copy() -- http://mail.python.org/mailman/listinfo/pyt

Re: python newbie - question about lexical scoping

2007-12-02 Thread hdante
On Dec 1, 11:31 pm, "Matt Barnicle" <[EMAIL PROTECTED]> wrote: > >> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: > > aye yaye aye... thanks for the pointers in the right direction.. i > > fiddled around with the code for a while and now i've reduced it to the > > *real* issue... i

Re: python newbie - question about lexical scoping

2007-12-02 Thread Bruno Desthuilliers
Matt Barnicle a écrit : >>>On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: >> >>aye yaye aye... thanks for the pointers in the right direction.. i >>fiddled around with the code for a while and now i've reduced it to the >>*real* issue... i have a class dict variable that apparently

Re: python newbie - question about lexical scoping

2007-12-02 Thread Hrvoje Niksic
"Matt Barnicle" <[EMAIL PROTECTED]> writes: >> i have a class dict variable that apparently holds its value across >> instantiations of new objects.. [...] > ok, i see... python has a concept i'm not accustomed to I don't doubt that Python managed to confuse you here, but in this case there is n

Re: python newbie - question about lexical scoping

2007-12-01 Thread Matt Barnicle
>> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: > aye yaye aye... thanks for the pointers in the right direction.. i > fiddled around with the code for a while and now i've reduced it to the > *real* issue... i have a class dict variable that apparently holds its > value across in

Re: python newbie - question about lexical scoping

2007-12-01 Thread Matt Barnicle
>> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: > aye yaye aye... thanks for the pointers in the right direction.. i > fiddled around with the code for a while and now i've reduced it to the > *real* issue... i have a class dict variable that apparently holds its > value across in

Re: python newbie - question about lexical scoping

2007-12-01 Thread Tim Roberts
Matt Barnicle <[EMAIL PROTECTED]> wrote: >hi everyone.. i've been chugging along learning python for a few months >now and getting answers to all needed questions on my own, but this one >i can't figure out nor can i find information on the internet about it, >possibly because i don't understa

Re: python newbie - question about lexical scoping

2007-12-01 Thread Matt Barnicle
> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: >> hi everyone.. i've been chugging along learning python for a few months >> now and getting answers to all needed questions on my own, but this one >> i can't figure out nor can i find information on the internet about it, >> possibly

Re: python newbie - question about lexical scoping

2007-12-01 Thread Matt Barnicle
> On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: >> hi everyone.. i've been chugging along learning python for a few months >> now and getting answers to all needed questions on my own, but this one >> i can't figure out nor can i find information on the internet about it, >> possibly

Re: python newbie - question about lexical scoping

2007-11-30 Thread John Machin
On Dec 1, 4:47 pm, Matt Barnicle <[EMAIL PROTECTED]> wrote: > hi everyone.. i've been chugging along learning python for a few months > now and getting answers to all needed questions on my own, but this one > i can't figure out nor can i find information on the internet about it, > possibly becau