MCPcopy Index your code
hub / github.com/python/cpython / MyIter

Class MyIter

Lib/test/test_capi/test_opt.py:507–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505
506 def test_for_iter_tier_two(self):
507 class MyIter:
508 def __init__(self, n):
509 self.n = n
510 def __iter__(self):
511 return self
512 def __next__(self):
513 self.n -= 1
514 if self.n < 0:
515 raise StopIteration
516 return self.n
517
518 def testfunc(n, m):
519 x = 0

Callers 1

testfuncMethod · 0.70

Calls

no outgoing calls

Tested by 1

testfuncMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…