[Python-3000] requiring parens around singleton tuples

Steven Bethard steven.bethard at gmail.com
Mon Dec 4 07:01:05 CET 2006

On 12/3/06, Neal Norwitz <nnorwitz at gmail.com> wrote:
> In looking at this and some other stuff, I thought about this code:
>  x = 1,
> How about requiring parens around (1,)?
> This would apply to x, = 1 as well (ie, both LHS and RHS).

FWLIW, I use the latter all the time and would greatly miss it. I
can't remember the last time I had a bug from it, though I can
certainly believe that they happen.

I avoid the ``(x,)`` thing like the plague -- too much punctuation for
me -- but if the single comma form goes away, I guess I could still be
happy with ``[x]`` for unpacking.

I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy

More information about the Python-3000 mailing list