Thank you.
jab
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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):