Re: python strings

Tim Peters (
Sat, 23 Apr 94 03:56:35 -0400

> : [guido]
> : ABC, Python's predecessor, had a convention whereby a backticks in
> : string literals did this (sh and Perl also have this in some of their
> : quoting schemes).
> [larry]
> Er, no. Perl doesn't do that. I'm somewhat allergic to the multiple
> interpretation levels of sh.

Blame me; I suspect Guido had the attached recently-posted Perl example
in mind. Note the 3rd line from the bottom ...

when-you-inherent-the-shell-you-inherit-its-backticks<wink>-ly y'rs
- tim

Tim Peters
not speaking for Kendall Square Research Corp

$substitution = 'piece of substituted text';

print <<HERE1, <<'HERE2', <<`HERE3`;
this is a really big multi line string that
has embedded "double quotes" and 'single quotes'
and a $substitution
and this is another chunk
but $substitution is suppressed because of the
single quotes on 'HERE2'
echo "and here's yet another"
echo produced by shell command `echo SUBSTITUTION | tr A-Z a-z`
echo because of the backticks on HERE3