def __init__(self, pointee, start=None, stop=None, oob=False):
        """Constructor."""
        # Hard-code borders.
        start = start or 0
        stop = stop or (start if stop == 0 else len(pointee))
        if not oob and start < 0:
            start += len(pointee)
        if stop < 0:
            stop += len(pointee)

        # Resolve nested references.
        if hasattr(pointee, 'pointee'):
            start += pointee.slice.start
            stop += pointee.slice.start
            pointee = pointee.pointee

        self.pointee = pointee
        self.slice = slice(start, stop)
def __init__ ( self , pointee , start = None , stop = None , oob = False ) : start = start or 0 stop = stop or ( start if stop == 0 else len ( pointee ) ) if not oob and start < 0 : start += len ( pointee ) if stop < 0 : stop += len ( pointee ) if hasattr ( pointee , 'pointee' ) : start += pointee . slice . start stop += pointee . slice . start pointee = pointee . pointee self . pointee = pointee self . slice = slice ( start , stop )
Constructor.