l
ÿÃOc               @   s   Gd  „  d e  ƒ Z d S(   c             B   sM   |  Ee  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d S(   c             C   s   d |  _  | |  _ d  S(   Ni    (   u   indexu   lst(   u   selfu   pylist(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   __init__   s    	c             C   s   |  j  t |  j ƒ k S(   u]   post: True if cursor has advanced past the last item
        of the sequence, false otherwise(   u   indexu   lenu   lst(   u   self(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   done   s    c             C   s   |  j  |  j S(   uS    pre: not self.done()
        post: Returns the item at the current cursor position(   u   lstu   index(   u   self(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   getItem   s    c             C   s   | |  j  |  j <d S(   uP    pre: not self.done()
           post: The current item in the sequence is valueN(   u   lstu   index(   u   selfu   value(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   replaceItem   s    c             C   s   |  j  |  j =d S(   u
   pre: not self.done()
        post: The item that cursor was pointing to is removed
        from the sequence and the cursor now points to 
        the following item
        
        note: removing the last item in the sequence causes
        self.done() to be TrueN(   u   lstu   index(   u   self(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu
   deleteItem(   s    
c             C   s   |  j  j |  j | ƒ d S(   uR   post: value is added to the sequence at the position of
                  cursor. 
                  
            note: If self.done() holds before the call, value will be
                  added to the end of the sequence. In other cases, 
                  the item that was at current position becomes the
                  next item.N(   u   lstu   insertu   index(   u   selfu   value(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu
   insertItem6   s    
c             C   s   |  j  d 7_  d S(   u‹    post: cursor has advanced to the next position in the
        sequence. Advancing from the last item causes
        self.done() to be Truei   N(   u   index(   u   self(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   advanceD   s    N(	   u   __name__u
   __module__u   __init__u   doneu   getItemu   replaceItemu
   deleteItemu
   insertItemu   advance(   u
   __locals__(    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   PyListCursor   s   
									u   PyListCursorN(   u   objectu   PyListCursor(    (    (    uJ   C:\Users\Terry\Desktop\Reed\CodeByChapter\Python3\Chapter4\PyListCursor.pyu   <module>   s    