mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
range() works now
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -45,6 +45,13 @@ for i in b:
|
||||
#? float() str()
|
||||
a[0]
|
||||
|
||||
# -----------------
|
||||
# range()
|
||||
# -----------------
|
||||
for i in range(10):
|
||||
#? int()
|
||||
i
|
||||
|
||||
# -----------------
|
||||
# list comprehensions
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user