î
&"ìV³  ã               @   s   Gd  d „  d e  ƒ Z d S)c               @   s.   e  Z d  Z d Z d d „  Z d d „  Z d S)ÚIteratora-  
    This class implements an iterator object that can be used to loop
    over an image sequence.

    You can use the ``[]`` operator to access elements by index. This operator
    will raise an :py:exc:`IndexError` if you try to access a nonexistent
    frame.

    :param im: An image object.
    c             C   s+   t  | d ƒ s t d ƒ ‚ n  | |  _ d  S)NÚseekzim must have seek method)ÚhasattrÚAttributeErrorÚim)Úselfr   © r   ú3/tmp/pip-build-fj3bmf4v/Pillow/PIL/ImageSequence.pyÚ__init__   s    zIterator.__init__c             C   sC   y$ | r |  j  j | ƒ n  |  j  SWn t k
 r> t ‚ Yn Xd  S)N)r   r   ÚEOFErrorÚ
IndexError)r   Úixr   r   r   Ú__getitem__$   s    zIterator.__getitem__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r   r   r   r   r   r      s   
r   N)Úobjectr   r   r   r   r   Ú<module>   s    