R. David Murray added the comment:

I agree that this is not immediately intuitive.

What you need to know is that modules are part of the global state.  When b 
imports dbus.mainloop.glib, it affects the global state of the module dbus, 
causing mainloop.glib to be defined when 'a' references it.

The fact that modules are global state is inherent in Python's design, and is 
the reason that "monkey patching" works.

----------
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17030>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to