Re: [q-lang-users] Q in FC6
Brought to you by:
agraef
From: Tim H. <q...@st...> - 2006-11-24 21:21:54
|
John Cowan <co...@cc...> writes: [snip] > No. That's the way that Q (>=6.2, as you say) represents a tuple with one > element. The syntax used to be just "(1770)", but that meant different > things in different contexts: it meant a tuple if the parens were > redundant, or just a plain expression of the parens were necessary > because of operator priorities. > > I successfully argued that this was obnoxious, and Q was changed to use > the same syntax as Python: the final element in a tuple MAY be followed > by a comma, and MUST be if it is the only element. Naturally, the > unparser follows the same rule, inserting the final comma only in > singletons. [snip] > Lists can't be confused with simple parens, so the final comma is > never necessary and the unparser will not generate it. Ah, cool. OK, that explains things. Thanks :) ~Tim -- <http://spodzone.org.uk/> |