constructing binary backslash-n
Steve Holden
steve at holdenweb.com
Thu Sep 30 08:36:09 EDT 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']
>
> Regards,
> Bengt Richter
Probably the best question of the thread.
And the answer is "probably because nobody would recognize the escapes".
regards
Steve
More information about the Python-list
mailing list