Commit 6d47246d authored by Stefan Behnel's avatar Stefan Behnel

fix doctest

parent 218a35f3
__doc__ = """ __doc__ = u"""
sage: get_locals(1,2,3) >>> sorted( get_locals(1,2,3, k=5) .items())
{'args': (2, 3), 'kwds': {}, 'x': 1, 'y': 'hi', 'z': 5} [('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)]
""" """
import sys
IS_PY3 = sys.version_info[0] >= 3
def get_locals(x, *args, **kwds): def get_locals(x, *args, **kwds):
y = "hi"
cdef int z = 5 cdef int z = 5
if IS_PY3:
y = u"hi"
else:
y = "hi"
return locals() return locals()
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