Commit d99d5939 authored by Stefan Behnel's avatar Stefan Behnel

extended test case

parent 9b394998
__doc__ = u"""
>>> sorted( get_locals(1,2,3, k=5) .items())
[('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)]
"""
import sys
IS_PY3 = sys.version_info[0] >= 3
>>> in_locals('z')
True
>>> in_locals('args')
True
>>> in_locals('X')
False
"""
def get_locals(x, *args, **kwds):
cdef int z = 5
if IS_PY3:
y = u"hi"
else:
y = "hi"
return locals()
def in_locals(x, *args, **kwds):
cdef int z = 5
y = "hi"
return x in locals()
def sorted(it):
l = list(it)
l.sort()
......
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