コード例 #1
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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
コード例 #2
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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
コード例 #3
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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]
コード例 #4
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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)
コード例 #5
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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
コード例 #6
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     return l.count(i)
コード例 #7
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(n):
     l = listobject.new_list(int32)
     l.append(n)
     return l[-1]
コード例 #8
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     # slice with a non-{integer,slice}
     l[i] = 1
コード例 #9
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     l.remove(0)
     return len(l)
コード例 #10
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 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]
コード例 #11
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     l.insert(i, 1)
     return len(l), l[0], l[1]
コード例 #12
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(items):
     l = listobject.new_list(int32)
     l.extend(items)
     return len(l)
コード例 #13
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     # slice with a non-{integer,slice}
     return l.pop(i)
コード例 #14
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     l.pop(i)
コード例 #15
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.pop(i)
コード例 #16
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     return l.pop(i), len(l)
コード例 #17
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     return l.pop(i), len(l)
コード例 #18
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     l[i] = 1
     return l[i]
コード例 #19
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     # assign a non-iterable to a slice
     l[:] = 1
コード例 #20
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(10)
     return l.count(i)
コード例 #21
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     for j in [11, 12, 12, 13, 13, 13]:
         l.append(j)
     return l.count(i)
コード例 #22
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.append(0)
     del l[0:1:1]
     return len(l)
コード例 #23
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.extend(1)
コード例 #24
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     for j in (10, 11, 12):
         l.append(j)
     del l[:]
     return len(l)
コード例 #25
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     for j in range(10, 20):
         l.append(j)
     return l[i]
コード例 #26
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     return i in l
コード例 #27
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.insert("a", 0)
コード例 #28
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo(i):
     l = listobject.new_list(int32)
     l.append(0)
     return i in l
コード例 #29
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def foo():
     l = listobject.new_list(int32)
     l.append(1)
     l.remove(0)
コード例 #30
0
ファイル: test_listobject.py プロジェクト: youjun301/numba
 def boxer():
     l = listobject.new_list(int32)
     for i in range(10, 20):
         l.append(i)
     return listobject._as_meminfo(l)