range() works now

This commit is contained in:
David Halter
2012-08-08 16:07:06 +02:00
parent 024cc78b2c
commit e4b911b943
3 changed files with 13 additions and 0 deletions

View File

@@ -936,6 +936,9 @@ def get_scopes_for_name(scope, name_str, position=None, search_global=False):
if isinstance(it, (Generator, Array)):
generators.append(it)
else:
if not hasattr(it, 'execute_subscope_by_name'):
debug.warning('for loop input wrong', it)
continue
try:
generators += it.execute_subscope_by_name('__iter__')
except KeyError:

View File

@@ -21,6 +21,9 @@ def iter(collection, sentinel=None):
for c in collection:
yield c
def range(start, stop=None, step=1):
return [0]
#--------------------------------------------------------
# descriptors

View File

@@ -45,6 +45,13 @@ for i in b:
#? float() str()
a[0]
# -----------------
# range()
# -----------------
for i in range(10):
#? int()
i
# -----------------
# list comprehensions
# -----------------