Explain this class,subclass,exception code, please
<pre><code>class AndTrigger(Trigger):
    def __init__(self,object1,object2):
        self.object1 = object1
        self.object2 = object2
    def evaluate(self,object):
        return self.object1.evaluate(self) and self.object2.evaluate(self)
</code></pre>

<p>I implemented this AND trigger and it works as it is supposed to, but I was only able to make it work by trial and error--I have no idea what 'self' is doing in this class.</p>

<p>Here's what I think is going on: the <code>__init__</code> is the constructor for the class, so any instance of the class uses this when created. The class has two attributes (object1, object2), the <code>__init__</code> when the class is created tells the new instance that these new attributes will be called 'object1' and 'object2' so they are assigned to self.object1 etc.</p>

<p>Now, this evaluate function is supposed to prevent a raise notimplemented in Trigger, but that's not what I don't get. In this evaluate function, it looks like it has two arguments--the instance of AndTrigger and another object. But where is this other object in the definition of <code>evaluate()</code>? It's just a puzzle to me how this works, but it does!</p>
