Peter Hansen <[EMAIL PROTECTED]> writes:

> Dan wrote:
>> You might think of modules in Python as like packages in Java. However,
>> putting classes in the same module doesn't give them any additional
>> powers to interact with each other. (At least, not that I know of.)
>
> Use of "global" to rebind shared module-scope names...

You can rebind module-scope names from outside the module. It's an
ugly practice, and I wouldn't recommend it, but it *is* possible.

But you're on the right track. If two consenting classes want to share
_named module variables, it's best that they be in the same module.

       <mike
-- 
Mike Meyer <[EMAIL PROTECTED]>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to