Update qhelp

This commit is contained in:
Joe Farebrother
2025-05-23 10:56:43 +01:00
parent 7b452a1611
commit f27057a747
2 changed files with 13 additions and 20 deletions

View File

@@ -0,0 +1,13 @@
class MyRange(object):
def __init__(self, low, high):
self.current = low
self.high = high
def __iter__(self):
return (self.current, self.high) # BAD: does not return `self`.
def __next__(self):
if self.current > self.high:
return None
self.current += 1
return self.current - 1