Show More
@@ -585,7 +585,9 b' def formatspec(expr, *args):' | |||
|
585 | 585 | >>> formatspec(b'branch(%b)', b) |
|
586 | 586 | "branch('default')" |
|
587 | 587 | >>> formatspec(b'root(%ls)', [b'a', b'b', b'c', b'd']) |
|
588 | "root(_list('a\\x00b\\x00c\\x00d'))" | |
|
588 | "root(_list('a\\\\x00b\\\\x00c\\\\x00d'))" | |
|
589 | >>> formatspec('%ls', ['a', "'"]) | |
|
590 | "_list('a\\\\x00\\\\'')" | |
|
589 | 591 | ''' |
|
590 | 592 | |
|
591 | 593 | def argtype(c, arg): |
@@ -614,7 +616,7 b' def formatspec(expr, *args):' | |||
|
614 | 616 | elif t == 'd': |
|
615 | 617 | return "_intlist('%s')" % "\0".join('%d' % int(a) for a in s) |
|
616 | 618 | elif t == 's': |
|
617 |
return "_list( |
|
|
619 | return "_list(%s)" % _quote("\0".join(s)) | |
|
618 | 620 | elif t == 'n': |
|
619 | 621 | return "_hexlist('%s')" % "\0".join(node.hex(a) for a in s) |
|
620 | 622 | elif t == 'b': |
General Comments 0
You need to be logged in to leave comments.
Login now