##// END OF EJS Templates
doctest: coerce dict.keys() to list...
Yuya Nishihara -
r34141:be00af4a default
parent child Browse files
Show More
@@ -489,10 +489,10 b' def _buildfuncargs(exp, context, curmeth'
489 ... x = _parseexpr(expr)
489 ... x = _parseexpr(expr)
490 ... n = getsymbol(x[1])
490 ... n = getsymbol(x[1])
491 ... return _buildfuncargs(x[2], context, exprmethods, n, argspec)
491 ... return _buildfuncargs(x[2], context, exprmethods, n, argspec)
492 >>> fargs(b'a(l=1, k=2)', b'k l m').keys()
492 >>> list(fargs(b'a(l=1, k=2)', b'k l m').keys())
493 ['l', 'k']
493 ['l', 'k']
494 >>> args = fargs(b'a(opts=1, k=2)', b'**opts')
494 >>> args = fargs(b'a(opts=1, k=2)', b'**opts')
495 >>> args.keys(), args[b'opts'].keys()
495 >>> list(args.keys()), list(args[b'opts'].keys())
496 (['opts'], ['opts', 'k'])
496 (['opts'], ['opts', 'k'])
497 """
497 """
498 def compiledict(xs):
498 def compiledict(xs):
@@ -584,7 +584,7 b' class sortdict(collections.OrderedDict):'
584 >>> d2
584 >>> d2
585 sortdict([('a', 0), ('b', 1)])
585 sortdict([('a', 0), ('b', 1)])
586 >>> d2.update([(b'a', 2)])
586 >>> d2.update([(b'a', 2)])
587 >>> d2.keys() # should still be in last-set order
587 >>> list(d2.keys()) # should still be in last-set order
588 ['b', 'a']
588 ['b', 'a']
589 '''
589 '''
590
590
General Comments 0
You need to be logged in to leave comments. Login now