Pythonification of the asterisk-based collection packing/unpacking syntax

Eelco hoogendoorn.eelco at gmail.com
Sun Dec 25 09:55:28 EST 2011


On Dec 25, 1:45 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Sat, 24 Dec 2011 06:54:07 -0800, Eelco wrote:
> > Context dependence is not something to be avoided at all costs, but all
> > else being equal, less is certainly more. The general concept of
> > grouping thing together which parenthesis is an extremely pervasive one
> > in programming, and thus deserves its own set of context-dependent
> > rules. Packing and unpacking collections is far, far more rare,
>
> Not in Python, where it is a very common idiom.

I know we are talking about python; it was me that put that in the
title, after all. I know python makes more use of this than some
languages (and less than others; I wouldnt suggest such a verbose
syntax for a functional language for instance). Anyway,  braces are
used at least an order of magnitude more than collection packing/
unpacking in typical code.



More information about the Python-list mailing list