Why do you pass self.pos0 and self.pos1 as arguments? If those are attributes, you don't need to pass them explicitely, do you?