1
0
forked from VimPlug/jedi

catched recursions in a special array case

This commit is contained in:
David Halter
2012-08-22 15:14:36 +02:00
parent d85184d387
commit b844fa201a
3 changed files with 86 additions and 38 deletions

View File

@@ -299,6 +299,28 @@ def blub():
#? int()
blub()[0]
# -----------------
# returns, the same for classes
# -----------------
class C():
def blub(self, b):
if 1:
a = []
a.append(b)
return a
def blub2(self):
""" mapper function """
a = self.blub(1.0)
#? float()
a[0]
return a
#? int()
C().blub(1)[0]
#? float()
C().blub2(1)[0]
# -----------------
# array recursions
@@ -314,15 +336,20 @@ list(a)[0]
def first(a):
b = []
b.append(a)
#b.extend(second(a))
return b
b.extend(second(a))
return list(b)
def second(a):
b = []
b.append(a)
b.extend(first(a))
b.extend(second(a))
return list(b)
#? float()
first(1.0)[0]
def third():
b = []
b.extend(first())
return list(b)
#?
third()[0]