projects
/
cython.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Cleared file executable bit that was set earlier by a mistake
[cython.git]
/
tests
/
run
/
slice2.pyx
1
__doc__ = u"""
2
>>> l = [1,2,3,4]
3
4
>>> f(1, l, 2, 3)
5
[1, 2, 3, 4]
6
>>> l == f(1, l, 2, 3)
7
True
8
>>> l is f(1, l, 2, 3)
9
False
10
11
>>> g(1, [1,2,3,4], 2, 3)
12
[3, 4]
13
14
>>> h(1, [1,2,3,4], 2, 3)
15
[1, 2, 3]
16
17
>>> j(1, [1,2,3,4], 2, 3)
18
[3]
19
"""
20
21
def f(obj1, obj2, obj3, obj4):
22
obj1 = obj2[:]
23
return obj1
24
25
def g(obj1, obj2, obj3, obj4):
26
obj1 = obj2[obj3:]
27
return obj1
28
29
def h(obj1, obj2, obj3, obj4):
30
obj1 = obj2[:obj4]
31
return obj1
32
33
def j(obj1, obj2, obj3, obj4):
34
obj1 = obj2[obj3:obj4]
35
return obj1