[Tutor] Re: generla import questions
Sat Apr 5 21:27:02 2003
>Say I have an app that does
>and some actual code.
>And in module b I have
>Are there now two copies of c in memory, are does all the class data and
>variables etc only exist once?
Just one copy
>Or put hit this way, if module c is:
>abc = "123"
>and module a does c.abc = "1234" in some function, and module b then
>prints c.abc what gets printed?
Try it. That is one of many cool things about python: you can
fire up the interpreter and type things at it and see what it
21:05 >cat > c.py
abc = "123"
21:21 >cat > a.py
c.abc = "1234"
Python 2.2 (#1, Jan 23 2002, 06:46:11)
[GCC 2.95.3 20010315 (release) [FreeBSD]] on freebsd4
Type "help", "copyright", "credits" or "license" for more information.
MSN 8 with e-mail virus protection service: 2 months FREE*