Alexander 'boesi' Bösecke wrote:
Hi
Am 10.08.2006 16:02:54 schrieb Alan G Isaac:
On Thu, 10 Aug 2006, Matthew Winn apparently wrote:
But "..." versus '...' is just as explicit.
Ah, that explains why the question keeps coming up on this
list and never in a Python forum ... Or not?
In fact, apart from Python and XML I can't think of any
languages that don't make a distinction between double and
single quotes, as it's an extremely useful difference and
it's a waste of a limited character set to ignore it.
Hmm, "I guess you 'never need' nested quotes?"
As an additional note not especially related to ViM - with '...' and
"..." you have 2 kind of strings. But how do you express unicode-strings?
Use `...` or something like that? And what happens, when in the future
there will be a 4. string-type? With the syntax of python that's no
problem.
cu boesi
What happens in the future when there's a 4th string type? The whole
point of this argument is to show you that there's even no need for a
3rd one.
If the script is in Unicode, I can enter any character into a 'raw' or
"cooked" string, using digraphs, a keymap, or the method described under
":help i_CTRL-V_digit". No problem. To describe, in a non-Unicode
script, strings containing Unicode codepoints not available in the
script's encoding, I would have to use a "cooked" string with \uhhhh or
maybe \<Char-0xhhhhhhhh> in it, where every h is a nybble, or else (for
one or a few particular codepoints) move them to a data item at the
start of the script, using for instance 'let s:bom = "\uFEFF"' then use
string concatenation elsewhere in the script. This only shows that when
describing strings containing non-Latin characters, Latin1 is not the
best encoding for the script (and BTW, the ":scriptencoding" command may
come in handy if the script is neither in Latin1 nor in UTF-8 with BOM.)
Best regards,
Tony.