Peter Otten <> writes:

> Lele Gaifax wrote:
>> The original intent is to replace spaces within a string with the regular
>> expression \s+ (see
>> ...
>> Accordingly to the documentation
>> ( “unknown escapes [in
>> the repl argument] such as \& are left alone”.

> According to
> rejection of \s is intentional
> """
> Changed in version 3.6: Unknown escapes consisting of '\' and an ASCII 
> letter now are errors.
> """

So, how am I supposed to achieve the mentioned intent? By doubling the escape
in the replacement?

> though IMHO the traceback needs a cleanup.

And the documentation as well, to clarify the fact immediately, without
assuming one will scroll down to the "changed in version" part (at least, that
is what seem the rule in other parts of the manual).

Thank you,
ciao, lele.
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.  |                 -- Fortunato Depero, 1929.


Reply via email to