diff options
author | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/tools/cython/Cython/Debugger/Tests/codefile |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/Tests/codefile')
-rw-r--r-- | contrib/tools/cython/Cython/Debugger/Tests/codefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/Tests/codefile b/contrib/tools/cython/Cython/Debugger/Tests/codefile new file mode 100644 index 00000000000..6b4c6b6addf --- /dev/null +++ b/contrib/tools/cython/Cython/Debugger/Tests/codefile @@ -0,0 +1,50 @@ +cdef extern from "stdio.h": + int puts(char *s) + +cdef extern from "cfuncs.h": + void some_c_function() + +import os + +cdef int c_var = 12 +python_var = 13 + +def spam(a=0): + cdef: + int b, c + + b = c = d = 0 + + b = 1 + c = 2 + int(10) + puts("spam") + os.path.join("foo", "bar") + some_c_function() + +cpdef eggs(): + pass + +cdef ham(): + pass + +cdef class SomeClass(object): + def spam(self): + pass + +def outer(): + cdef object a = "an object" + def inner(): + b = 2 + # access closed over variables + print a, b + return inner + + +outer()() + +spam() +print "bye!" + +def use_ham(): + ham() |