mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-14 06:48:56 +08:00
implemented xrange
This commit is contained in:
1 parent
2d6ba4e8ec
commit
e41c4c6cc3
1 file changed
+12
@@ -26,6 +26,18 @@ def range(start, stop=None, step=1):
|
||||
return [0]
|
||||
|
||||
|
||||
class xrange():
|
||||
# Attention: this function doesn't exist in Py3k (there it is range).
|
||||
def __iter__(self):
|
||||
yield 1
|
||||
|
||||
def count(self):
|
||||
return 1
|
||||
|
||||
def index(self):
|
||||
return 1
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# descriptors
|
||||
#--------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user