On Sun, Nov 08, 17:03:29 +1100, Danielle Madeley wrote:
> One of the things when writing a D-Bus service in Python is that you
> have to know the type signatures of the methods to pass to the
> dbus.service.method decorator. This is something that's very easy to
> typo, also something that's already stored in the spec.

Well, unless I'm misunderstanding you, you don't have to type these
out. If you subclass an object, its method decorators are still around
on overridden methods. For example:

    class MyFirstObserver(telepathy._generated.ClientObserver):

       # oh look, no @dbus.service.method, because it already was
       # declared in the parent class.
       def ObserveChannels(self, account, connection, cahnnels,
                           dispatch_operation, requests_satisfied,
                           observer_info):
           # misc

It would be nicer to import ClientObserver into tp.client as Observer
and maybe add some helper methods, instead of importing from
_generated.

-- 
Jonny Lamb, UK
[email protected]
_______________________________________________
telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy

Reply via email to