Re: name space problem

2007-10-24 Thread BBands
Thank you. jab -- http://mail.python.org/mailman/listinfo/python-list

Re: name space problem

2007-10-24 Thread Bruno Desthuilliers
BBands a écrit : > On Oct 23, 4:20 pm, [EMAIL PROTECTED] wrote: >> Hello. Indeed the doStuff function in the doStuff module can't do 'a.b >> = 0' (the double dot was just a typo, right?) > > Yes. > >> because it doesn't know anything about an object named a. > > I was trying to understand why it

Re: name space problem

2007-10-23 Thread Gabriel Genellina
En Tue, 23 Oct 2007 23:34:38 -0300, BBands <[EMAIL PROTECTED]> escribió: > On Oct 23, 4:20 pm, [EMAIL PROTECTED] wrote: > I was trying to understand why it worked when written in, but not when > included. Not *included*. When you do `import doStuff` you dont "include" anything; this is what ha

Re: name space problem

2007-10-23 Thread BBands
On Oct 23, 4:20 pm, [EMAIL PROTECTED] wrote: > Hello. Indeed the doStuff function in the doStuff module can't do 'a.b > = 0' (the double dot was just a typo, right?) Yes. > because it doesn't know anything about an object named a. I was trying to understand why it worked when written in, but not

Re: name space problem

2007-10-23 Thread marek . rocki
BBands napisa (a): > An example: > > class classA: > def __init__(self): > self.b = 1 > > def doStuff(): > some calcs > a..b = 0 > > a = classA(): > print a.b > doStuff() > print a.b > > That works as hoped, printing 1, 0. > > But, if I move doStuff to another module and: > > im

name space problem

2007-10-23 Thread BBands
An example: class classA: def __init__(self): self.b = 1 def doStuff(): some calcs a..b = 0 a = classA(): print a.b doStuff() print a.b That works as hoped, printing 1, 0. But, if I move doStuff to another module and: import doStuff class classA: def __init__(self):