Commit 9b394998 authored by Stefan Behnel's avatar Stefan Behnel

test case for locals(), ticket 429

parent f2a2f905
......@@ -8,3 +8,4 @@ unsignedbehaviour_T184
bad_c_struct_T252
missing_baseclass_in_predecl_T262
extended_unpacking_T409
locals_rebind_T429
__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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment