Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_iter.BasicIterClass Class Reference

List of all members.

Public Member Functions

def __init__
def __next__

Public Attributes

 n
 i

Detailed Description

Definition at line 21 of file test_iter.py.


Constructor & Destructor Documentation

def test.test_iter.BasicIterClass.__init__ (   self,
  n 
)

Definition at line 22 of file test_iter.py.

00022 
00023     def __init__(self, n):
00024         self.n = n
        self.i = 0

Here is the caller graph for this function:


Member Function Documentation

Definition at line 25 of file test_iter.py.

00025 
00026     def __next__(self):
00027         res = self.i
00028         if res >= self.n:
00029             raise StopIteration
00030         self.i = res + 1
00031         return res


Member Data Documentation

Definition at line 24 of file test_iter.py.

Definition at line 23 of file test_iter.py.


The documentation for this class was generated from the following file: