Hey, I have the following code that has to send every command it
receives to a list of backends. Instead of:

class MultiBackend(object):
    """Renders to multiple backends"""

    def __init__(self, backends):
        self.backends = backends

    def flush(self):
        for b in self.backends:
            b.flush()

    def draw(self):
        for b in self.backends:
            b.draw()


I would like to write each method like:

    flush = multimethod()

Is that possible using new-style classes?

Bert

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to