[Python-Dev] Utopian String Interpolation

Paul Svensson paul@svensson.org
Wed, 16 Jan 2002 15:26:23 -0500 (EST)


On Wed, 16 Jan 2002, Paul Prescod wrote:

>The documentation says:
>
>"Unlike Standard  , 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 broken.)"
>
>That's a weird thing to say. What could be more helpful for debugging
>than a good old SyntaxError???

The usefulness is relative; it's arguably easier to find the
problem and fix it if the \ remains in the string than if it's
simply removed (as C does, tho most compilers issue a warning).

It could also be argued that you get more nutritinal value by eating only
the black raisins from the cake then by eating just the golden raisins...

	/Paul