Message180576
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. |
|
Date |
User |
Action |
Args |
2013-01-25 13:21:57 | r.david.murray | set | recipients:
+ r.david.murray, geryon |
2013-01-25 13:21:57 | r.david.murray | set | messageid: <1359120117.15.0.173064785911.issue17030@psf.upfronthosting.co.za> |
2013-01-25 13:21:57 | r.david.murray | link | issue17030 messages |
2013-01-25 13:21:56 | r.david.murray | create | |
|