<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>delegate</name>
<shortdesc>Class to automate delegation decisions based on inheritance graph.</shortdesc>
<description>Class to automate delegation decisions based on inheritance graph.

Copyright 2004, Robert Dick (dickrp@ece.northwestern.edu).

Whenever you need to delegate to something, inherit from delegate and use
self.__&lt;base&gt;.&lt;method()&gt; to access the base.  If the delegation was
inappropriate due to reconverging paths in the inheritance graph, the return
value will be None.  In the case of reconverging paths, the left-most call in
the method resolution order will be honored.  The rest will be nulified.  You
can also check to see if the base is the no_delegation object.  Delegate to all
your bases if you need everything in the inheritance graph to be visited.  As
long as one of a class's (transitive) bases inherits from Delegate, that's
enough.

For examples of use, please see the delegate.py file.

Python doesn't yet automate meta-class instantiation.  If you need to inherit
from Delegate and another class that does not have a 'type' metaclass, you'll
need to generate a shared derived metaclass and explicitly use that as your
class's metaclass.  For example:

  import Delegate, qt

  class sip_meta_join(type(Delegate), type(qt.QObject)):
    def __init__(*args):
      type(Delegate).__init__(*args)
      type(qt.QObject).__init__(*args)

  class MyClass(Delegate, qt.QObject):
    __metaclass__ = sip_meta_join
    ...

Please see the license at the end of the source code for legal information.</description>
<download-page>http://ziyang.ece.northwestern.edu/~dickrp/python/delegate-0.1.tar.gz</download-page>
<homepage rdf:resource="http://ziyang.ece.northwestern.edu/~dickrp/python/mods.html" />
<maintainer><foaf:Person><foaf:name>Robert Dick</foaf:name>
<foaf:mbox_sha1sum>39a78cca6c5c92d18d11f84adb1bf69196880386</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.1</revision></Version></release>
</Project></rdf:RDF>