On Sat, Aug 1, 2020 at 4:31 AM Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2020-07-31, Bart <b...@freeuk.com> wrote:
> > Not sure about the trailing commas on each. It seems Python ignores
> > trailing commas on tuple constructors, so that the A,B, would be a
> > 2-tuple, and A+B, would have been a 1-tuple if A+B had been legal.
>
> It's not just tuples, it's lists, sets, dictionaries, etc.

And function parameters and basically anything that permits a
comma-separated sequence. Or any other sort of sequence. You can have
multiple simple statements on one line, separated by semicolons - and
it's legal to have a spare semi at the end.

It's REALLY annoying to run into those few cases where that doesn't
work (JSON, and the SQL "create table" statement, and a handful of
others).

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to