Range should support constants int as an input.
TREE_FIDDY: constant(uint256) = 350
def a():
for i in range(TREE_FIDDY):
if i == 3:
break
See parse_for in stmt.py.
vyper.exceptions.StructureException: line 5: Range only accepts literal values
for i in range(ONE):
-------------^
![]()
Updated the constant in your example because ONE = 50 made no sense to me lol
LOL!
Starting work on this.
Hi
It's fixed ?
TREE_FIDDY: int128
@public
def a():
self.TREE_FIDDY=12
for i in range(self.TREE_FIDDY):
if i == 3:
break
line 7: Range only accepts literal values
for i in range(self.TREE_FIDDY):
-------------^
Yes, constans don't use self.