Tuple Format?

Erik Max Francis max at alcyone.com
Sun Sep 3 12:42:46 EDT 2000


Grant Edwards wrote:

> Single quotes would not be string delimiters any more.  Strings would
> all be
> double-quoted. That means we'd loose the convenience of being able to
> type
> things like 'he said "this is a string."' and would have to fall back
> to
> escaping quotes inside strings: "he said \"this is a string\".".

Why are you suggesting such a fundamental change in the language for
such a strange change?  You're basically reworking the entire way tuples
and string literals work -- for what purpose?

> This would, of course, break tons and tons of existing code with
> little
> benefit other than eliminating the "weird" bit about singleton and
> empty
> tuples and eliminating some ambiguity over whether commas are part of
> certain statement's syntax or are tuple-constructors.

It has other problems.  What is

    ''a''?

Is it the tuple ((a))?  Or is it an empty tuple, an a and another empty
tuple:  () a ()?

> I don't think the single back-quote "`" is used for anything in
> Python, is
> it?

Sure it is.

    print `1`

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ If love is the answer, could you rephrase the question?
\__/ Lily Tomlin
    Physics reference / http://www.alcyone.com/max/reference/physics/
 A physics reference.



More information about the Python-list mailing list