Show '\011', '\012', and '\015' as '\t', '\n', '\r' in strings.

Switch from octal escapes to hex escapes for other nonprintable characters.
This commit is contained in:
Ka-Ping Yee 2001-01-24 17:19:08 +00:00
parent 726b78ecb8
commit fa004ad36c
13 changed files with 221 additions and 205 deletions

View file

@ -432,7 +432,7 @@ buried deep in nested tuples.
(297,
(298,
(299,
(300, (3, '"""Some documentation.\012"""'))))))))))))))))),
(300, (3, '"""Some documentation.\n"""'))))))))))))))))),
(4, ''))),
(4, ''),
(0, ''))
@ -537,7 +537,7 @@ module docstring from the parse tree created previously is easy:
>>> found
1
>>> vars
{'docstring': '"""Some documentation.\012"""'}
{'docstring': '"""Some documentation.\n"""'}
\end{verbatim}
Once specific data can be extracted from a location where it is