Your IP : 216.73.216.213
�ʴW� � @ s Gd d � d e � Z d S)c @ sR e Z d Z d Z d d � Z d d � Z d 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 s1 t | d � s t d � � | | _ d | _ d S)N�seekzim must have seek method� )�hasattr�AttributeError�im�position)�selfr � r �D/opt/alt/python35/lib64/python3.5/site-packages/PIL/ImageSequence.py�__init__ s zIterator.__init__c C s: y | j j | � | j SWn t k
r5 t � Yn Xd S)N)r r �EOFError�
IndexError)r Zixr r r
�__getitem__% s
zIterator.__getitem__c C s | S)Nr )r r r r
�__iter__, s zIterator.__iter__c C sL y- | j j | j � | j d 7_ | j SWn t k
rG t � Yn Xd S)N� )r r r r �
StopIteration)r r r r
�__next__/ s
zIterator.__next__c C s
| j � S)N)r )r r r r
�next7 s z
Iterator.nextN) �__name__�
__module__�__qualname__�__doc__r r r r r r r r r
r s
r N)�objectr r r r r
�<module> s