[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Interpret #r"..." as a raw string
From: |
Daniel Brooks |
Subject: |
Re: [PATCH] Interpret #r"..." as a raw string |
Date: |
Wed, 03 Mar 2021 01:25:40 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Mär 02 2021, Daniel Brooks wrote:
>
>> net/tramp-sh.el
>> 962: quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
>>
>> Look at that! 19 backslashes followed by a double–quote.
>
> That can easily be halved by using '' instead of "".
That is absolutely true. We could then halve it again by using a raw
string literal. (Or we could eliminate it entirely with a suitable
abstraction, but that's for a different conversation.)
As escaping is an exponential function, anything we can do to reduce
that exponent is equally valuable.
db48x
- Re: [PATCH] Interpret #r"..." as a raw string, (continued)
- Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Aurélien Aptel, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Aurélien Aptel, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Alfred M. Szmidt, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/02
- Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string,
Daniel Brooks <=
- Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Andreas Schwab, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Michael Albinus, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Daniel Brooks, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Michael Albinus, 2021/03/03
- Re: [PATCH] Interpret #r"..." as a raw string, Stefan Monnier, 2021/03/03