constructing binary backslash-n
steve at holdenweb.com
Thu Sep 30 14:36:09 CEST 2004
Bengt Richter wrote:
> On Thu, 30 Sep 2004 00:27:17 -0400, Tim Peters <tim.peters at gmail.com> wrote:
>>The only letters that have special meaning after a backslash are:
>>a b f n r t v x
> Hm, why aren't they all used by repr? E.g.,
> >>> list('\a\b\f\n\r\t\v\x00')
> ['\x07', '\x08', '\x0c', '\n', '\r', '\t', '\x0b', '\x00']
> Bengt Richter
Probably the best question of the thread.
And the answer is "probably because nobody would recognize the escapes".
More information about the Python-list