This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients geryon, r.david.murray
Date 2013-01-25.13:21:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359120117.15.0.173064785911.issue17030@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-01-25 13:21:57r.david.murraysetrecipients: + r.david.murray, geryon
2013-01-25 13:21:57r.david.murraysetmessageid: <1359120117.15.0.173064785911.issue17030@psf.upfronthosting.co.za>
2013-01-25 13:21:57r.david.murraylinkissue17030 messages
2013-01-25 13:21:56r.david.murraycreate