Fixed problem with mrange

This commit is contained in:
Oliver Hofmann 2025-03-26 16:12:28 +01:00
parent e14a11540c
commit 882310a859

View File

@ -15,9 +15,14 @@ def mrange(parm1, parm2=None, parm3=None):
stop = int(parm2)
step = int(parm3)
num = start
while num < stop:
yield Literal(num)
num += step
if step > 0:
while num < stop:
yield Literal(num)
num += step
else:
while num > stop:
yield Literal(num)
num += step
if __name__ == "__main__":
for l in mrange(10):