MCPcopy Index your code
hub / github.com/RustPython/RustPython / CIterNext

Class CIterNext

extra_tests/snippets/builtin_list.py:596–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594# class
595# __next__
596class CIterNext:
597 def __init__(self, sec=(1, 2, 3)):
598 self.sec = sec
599 self.index = 0
600
601 def __iter__(self):
602 return self
603
604 def __next__(self):
605 if self.index >= len(self.sec):
606 raise StopIteration
607 v = self.sec[self.index]
608 self.index += 1
609 return v
610
611
612x = list(range(10))

Callers 1

builtin_list.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected