Esempio n. 1
0
 def foo():
     t = listobject.new_list(int32)
     o = listobject.new_list(int32)
     for i in range(10):
         t.append(i)
         o.append(i)
     return t == o, t != o
Esempio n. 2
0
 def foo():
     l = listobject.new_list(int32)
     for j in range(10, 20):
         l.append(j)
     k = listobject.new_list(int32)
     for j in range(10, 20):
         k.append(j)
     # should be a no-op
     del l[-9:-20]
     return k == l
Esempio n. 3
0
 def foo():
     l = listobject.new_list(types.unicode_type)
     l.append('a')
     l.append('b')
     l.append('c')
     l.append('d')
     return l[0], l[1], l[2], l[3]
Esempio n. 4
0
 def foo():
     l = listobject.new_list(int32)
     for j in range(10, 20):
         l.append(j)
     l.remove(13)
     l.remove(19)
     return len(l)
Esempio n. 5
0
 def foo(items):
     l = listobject.new_list(int32)
     l.extend(items)
     # use a simple sum to check this w/o having to return a list
     r = 0
     for j in l:
         r += j
     return r
Esempio n. 6
0
 def foo(i):
     l = listobject.new_list(int32)
     return l.count(i)
Esempio n. 7
0
 def foo(n):
     l = listobject.new_list(int32)
     l.append(n)
     return l[-1]
Esempio n. 8
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     # slice with a non-{integer,slice}
     l[i] = 1
Esempio n. 9
0
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     l.remove(0)
     return len(l)
Esempio n. 10
0
 def foo(i):
     l = listobject.new_list(int32)
     for j in range(10):
         l.append(0)
     l.insert(i, 1)
     return len(l), l[10]
Esempio n. 11
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     l.insert(i, 1)
     return len(l), l[0], l[1]
Esempio n. 12
0
 def foo(items):
     l = listobject.new_list(int32)
     l.extend(items)
     return len(l)
Esempio n. 13
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     # slice with a non-{integer,slice}
     return l.pop(i)
Esempio n. 14
0
 def foo(i):
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     l.pop(i)
Esempio n. 15
0
 def foo(i):
     l = listobject.new_list(int32)
     l.pop(i)
Esempio n. 16
0
 def foo(i):
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     return l.pop(i), len(l)
Esempio n. 17
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     return l.pop(i), len(l)
Esempio n. 18
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     l[i] = 1
     return l[i]
Esempio n. 19
0
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     # assign a non-iterable to a slice
     l[:] = 1
Esempio n. 20
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(10)
     return l.count(i)
Esempio n. 21
0
 def foo(i):
     l = listobject.new_list(int32)
     for j in [11, 12, 12, 13, 13, 13]:
         l.append(j)
     return l.count(i)
Esempio n. 22
0
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     del l[0:1:1]
     return len(l)
Esempio n. 23
0
 def foo():
     l = listobject.new_list(int32)
     l.extend(1)
Esempio n. 24
0
 def foo():
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     del l[:]
     return len(l)
Esempio n. 25
0
 def foo(i):
     l = listobject.new_list(int32)
     for j in range(10, 20):
         l.append(j)
     return l[i]
Esempio n. 26
0
 def foo(i):
     l = listobject.new_list(int32)
     return i in l
Esempio n. 27
0
 def foo():
     l = listobject.new_list(int32)
     l.insert("a", 0)
Esempio n. 28
0
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     return i in l
Esempio n. 29
0
 def foo():
     l = listobject.new_list(int32)
     l.append(1)
     l.remove(0)
Esempio n. 30
0
 def boxer():
     l = listobject.new_list(int32)
     for i in range(10, 20):
         l.append(i)
     return listobject._as_meminfo(l)