[Python-ideas] Add \e escape code

Ethan Furman ethan at stoneleaf.us
Tue Jun 11 18:35:13 CEST 2013


On 06/11/2013 09:22 AM, 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.

+1 to have it (back?)

--
~Ethan~


More information about the Python-ideas mailing list