Pythonification of the asterisk-based collection packing/unpacking syntax

Eelco hoogendoorn.eelco at gmail.com
Mon Dec 26 15:39:30 EST 2011


On Dec 25, 5:15 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Sun, 25 Dec 2011 06:55:28 -0800, Eelco wrote:
> > Anyway,  braces are used at
> > least an order of magnitude more than collection packing/ unpacking in
> > typical code.
>
> That's a wild and unjustified claim. Here's a quick and dirty test, using
> the standard library as an example of typical idiomatic code:
>
> [steve at orac ~]$ cd /usr/lib/python2.6
> [steve at orac python2.6]$ grep "[*]args" *.py | wc -l
> 270
> [steve at orac python2.6]$ grep "{" *.py | wc -l
> 550
>
> Doesn't look like a factor of 10 difference to me.

Now try it without changing the subject from round braces to
everything but round braces.



More information about the Python-list mailing list