def contains(self, row, col):
    'Determine whether the position at row, col lay within this window.'
    for i in self.zOrder:
        if i.contains(row, col):
            return i
    return ((self.top <= row < (self.top + self.rows)) and (self.left <= col < (self.left + self.cols)) and self)
Determine whether the position at row, col lay within this window.
def contains(self, row, col):
    
    for i in self.zOrder:
        if i.contains(row, col):
            return i
    return ((self.top <= row < (self.top + self.rows)) and (self.left <= col < (self.left + self.cols)) and self)