mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-21 13:01:14 +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)):
|
if isinstance(it, (Generator, Array)):
|
||||||
generators.append(it)
|
generators.append(it)
|
||||||
else:
|
else:
|
||||||
|
if not hasattr(it, 'execute_subscope_by_name'):
|
||||||
|
debug.warning('for loop input wrong', it)
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
generators += it.execute_subscope_by_name('__iter__')
|
generators += it.execute_subscope_by_name('__iter__')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ def iter(collection, sentinel=None):
|
|||||||
for c in collection:
|
for c in collection:
|
||||||
yield c
|
yield c
|
||||||
|
|
||||||
|
def range(start, stop=None, step=1):
|
||||||
|
return [0]
|
||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
# descriptors
|
# descriptors
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ for i in b:
|
|||||||
#? float() str()
|
#? float() str()
|
||||||
a[0]
|
a[0]
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# range()
|
||||||
|
# -----------------
|
||||||
|
for i in range(10):
|
||||||
|
#? int()
|
||||||
|
i
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# list comprehensions
|
# list comprehensions
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user