New Python 3.0 string formatting - really necessary?

Michael Torrie torriem at gmail.com
Mon Dec 22 11:21:45 EST 2008


r wrote:
> Steven,
> Would you like to elaborate on -why- escaped backslashes are needed in
> strings... i waiting???

Some character was needed.  It just happens that backslashes have been
used in this manner for composing nonprintable sequences, codes, etc.
It's only in use because someone arbitrarily picked it about 40 years
ago.  Any character could have been used; any such character would still
be have to escaped.

Kind of funny that you are complaining about Python in particular when
this behavior is in almost all languages today, including Perl, Ruby,

Don't blame python for a mistake that Microsoft made, that of choosing a
commonly-accepted escape character (long before Python was even though
of!) as their path delimiter.  Fortunately sane operating systems use a
standard slash.  Even Windows APIs accept forward slashes as path
delimiters.

So really your complaint about the backslash is a bit silly.  Are you
going to campaign that C# and Java also "fix" this problem by choosing
another character?



More information about the Python-list mailing list