1cimport cython 2 3def unbound_method_lookup(): 4 """ 5 >>> unbound_method_lookup() 6 """ 7 ignore = slice.indices 8 9@cython.test_assert_path_exists('//SingleAssignmentNode//AttributeNode[@is_py_attr = False]') 10@cython.test_fail_if_path_exists('//SingleAssignmentNode//AttributeNode[@is_py_attr = True]') 11def typed_slice(): 12 """ 13 >>> typed_slice() 14 (1, 2, 3) 15 """ 16 cdef slice s 17 cdef object z 18 cdef Py_ssize_t a,b,c 19 20 z = slice 21 s = slice(1, 2, 3) 22 s.indices 23 24 a = s.start 25 b = s.stop 26 c = s.step 27 28 return (a,b,c) 29 30@cython.test_fail_if_path_exists('//SingleAssignmentNode//AttributeNode[@is_py_attr = False]') 31def plain_object_slice(): 32 """ 33 >>> plain_object_slice() 34 (1, 2, 3) 35 """ 36 cdef object s 37 cdef object z 38 cdef Py_ssize_t a,b,c 39 40 s = slice(1, 2, 3) 41 s.indices 42 43 a = s.start 44 b = s.stop 45 c = s.step 46 47 return (a,b,c) 48