projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ef9e23
)
Py3 locals test
author
Stefan Behnel
<scoder@users.berlios.de>
Mon, 22 Nov 2010 07:45:19 +0000
(08:45 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Mon, 22 Nov 2010 07:45:19 +0000
(08:45 +0100)
tests/run/cython3.pyx
patch
|
blob
|
history
diff --git
a/tests/run/cython3.pyx
b/tests/run/cython3.pyx
index 04a569bbb1cb0907025ed0206ae94250af06e931..1712998633896ea3d93937b10c67dd588e4e5940 100644
(file)
--- a/
tests/run/cython3.pyx
+++ b/
tests/run/cython3.pyx
@@
-17,6
+17,19
@@
def print_function(*args):
"""
print(*args) # this isn't valid Py2 syntax
+def locals_function(a, b=2):
+ """
+ >>> items = list(locals_function(1).items())
+ >>> items.sort()
+ >>> for item in items:
+ ... print('%s = %r' % item)
+ a = 1
+ b = 2
+ x = 'abc'
+ """
+ x = 'abc'
+ return locals()
+
def exec3_function(cmd):
"""
>>> exec3_function('a = 1+1')['a']