Nick Coghlan wrote:
> So my vote would actually go for deprecating the use of square brackets to
> surround an assignment target list - it makes it look like an actual list
> object should be involved somewhere, but there isn't one.

I've found myself using square brackets a few times for more
complicated unpacking, e.g.:

try:
    x, y = args
except ValueError:
    [x], y = args, None

where I thought that

    (x,), y = args, None

would have been more confusing.  OTOH, I usually end up rewriting this to

    x, = args
    y = None

because even the bracketed form is a bit confusing.  So I wouldn't
really be upset if the brackets went away.

STeVe
--
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to