Show More
@@ -27,12 +27,13 b' def _string_escape(text):' | |||
|
27 | 27 | |
|
28 | 28 | def decodeextra(text): |
|
29 | 29 | """ |
|
30 | >>> from pprint import pprint as pp | |
|
31 | >>> pp(decodeextra(encodeextra({'foo': 'bar', 'baz': chr(0) + '2'}))) | |
|
32 |
|
|
|
33 |
>>> |
|
|
34 |
... 'baz': chr(92) + chr(0) + '2'}) |
|
|
35 | {'baz': '\\\\\\x002', 'branch': 'default', 'foo': 'bar'} | |
|
30 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', 'baz': chr(0) + '2'}) | |
|
31 | ... ).iteritems()) | |
|
32 | [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')] | |
|
33 | >>> sorted(decodeextra(encodeextra({'foo': 'bar', | |
|
34 | ... 'baz': chr(92) + chr(0) + '2'}) | |
|
35 | ... ).iteritems()) | |
|
36 | [('baz', '\\\\\\x002'), ('branch', 'default'), ('foo', 'bar')] | |
|
36 | 37 | """ |
|
37 | 38 | extra = _defaultextra.copy() |
|
38 | 39 | for l in text.split('\0'): |
General Comments 0
You need to be logged in to leave comments.
Login now