Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
9b394998
Commit
9b394998
authored
Oct 21, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for locals(), ticket 429
parent
f2a2f905
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
tests/bugs.txt
tests/bugs.txt
+1
-0
tests/run/locals_rebind_T429.pyx
tests/run/locals_rebind_T429.pyx
+25
-0
No files found.
tests/bugs.txt
View file @
9b394998
...
@@ -8,3 +8,4 @@ unsignedbehaviour_T184
...
@@ -8,3 +8,4 @@ unsignedbehaviour_T184
bad_c_struct_T252
bad_c_struct_T252
missing_baseclass_in_predecl_T262
missing_baseclass_in_predecl_T262
extended_unpacking_T409
extended_unpacking_T409
locals_rebind_T429
tests/run/locals_rebind_T429.pyx
0 → 100644
View file @
9b394998
__doc__
=
u"""
>>> sorted( get_locals(1,2,3, k=5) .items())
[('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)]
>>> get_locals_rebound(1,2,3)
'REBOUND'
"""
def
get_locals
(
x
,
*
args
,
**
kwds
):
cdef
int
z
=
5
y
=
"hi"
return
locals
()
def
get_locals_rebound
(
x
,
*
args
,
**
kwds
):
cdef
int
z
=
5
locals
=
_locals
y
=
"hi"
return
locals
()
def
_locals
():
return
"REBOUND"
def
sorted
(
it
):
l
=
list
(
it
)
l
.
sort
()
return
l
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment