[Python-ideas] Add \e escape code

MRAB python at mrabarnett.plus.com
Tue Jun 11 19:02:57 CEST 2013


On 11/06/2013 17:22, Steven D'Aprano wrote:
> Should Python support \e in strings for the ESC control character,
> ASCII 0x1B (27)?
>
> \e is supported by Perl, PHP, Ruby, and although it is not standard
> C, gcc:
>
> http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Character-Escapes.html
>
> I have the Python Pocket Reference, by Mark Lutz, 1st Edition from
> 1998, which lists \e as a string escape code. I don't know if that
> was a mistake, or if \e used to be supported prior to 1.5 but was
> then removed.
>
I wouldn't say no, but, on the other hand, it has been a very long time
since I personally have used it. In other words, is there sufficient
demand for it?


More information about the Python-ideas mailing list