[Python-Dev] Yet another string formatting proposal
Thu, 21 Nov 2002 17:46:18 -0500
On Thu, Nov 21, 2002 at 10:22:48PM +0100, Fredrik Lundh wrote:
> Oren Tirosh wrote:
> > Yes, it might break some existing code that doesn't use proper \\ escaping
> > or raw strings for regular expression. Note that such code is already
> > broken in the sense that it uses an undefined escape.
> "not proper"? "broken"? "undefined"?
> Please read the section on string escapes in the *Python* language
> reference, and try again. Start here:
Unlike Standard C, all UNRECOGNIZED escape sequences are left in
the string unchanged, i.e., the backslash is left in the string.
(This behavior is useful when deBUGging: if an escape sequence is
MISTYPED, the resulting output is more easily recognized as
My mistake. I should have RTFM. There was no excuse for me calling such
escape sequences "undefined" and not "proper" when the documentation
describes escape sequences not listed in the table as merely
"unrecognized" or possibly "mistyped". Sorry.