| 29 | # Helper classes |
| 30 | |
| 31 | class BasicIterClass: |
| 32 | def __init__(self, n): |
| 33 | self.n = n |
| 34 | self.i = 0 |
| 35 | def __next__(self): |
| 36 | res = self.i |
| 37 | if res >= self.n: |
| 38 | raise StopIteration |
| 39 | self.i = res + 1 |
| 40 | return res |
| 41 | def __iter__(self): |
| 42 | return self |
| 43 | |
| 44 | class IteratingSequenceClass: |
| 45 | def __init__(self, n): |
no outgoing calls
searching dependent graphs…