New submission from Stephan: $ cat a.py import dbus import b dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) print "Hello, World." $ cat b.py import dbus.mainloop.glib $ python a.py Hello, World. $
If I remove the “import b” line, the output is: $ python a.py Traceback (most recent call last): File "a.py", line 3, in <module> dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) AttributeError: 'module' object has no attribute 'mainloop' $ In my opinion this is inconsistent. Either both versions should fail with that error, because “dbus.mainloop.glib” is imported in “b”, not “a”; or both should succeed, because “a” imports dbus. This is Python 2.7.3 and python-dbus 1.0.0 on Ubuntu 12.4.2 ---------- components: Interpreter Core messages: 180574 nosy: geryon priority: normal severity: normal status: open title: strange import visibility type: behavior versions: Python 2.7 _______________________________________ 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