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