Message180574
$ 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 |
|
Date |
User |
Action |
Args |
2013-01-25 12:57:47 | geryon | set | recipients:
+ geryon |
2013-01-25 12:57:46 | geryon | set | messageid: <1359118666.97.0.0299772103321.issue17030@psf.upfronthosting.co.za> |
2013-01-25 12:57:46 | geryon | link | issue17030 messages |
2013-01-25 12:57:46 | geryon | create | |
|