On Mon, Mar 24, 2014 at 8:49 PM, Steven D'Aprano <st...@pearwood.info> wrote: > I'm too lazy to do this the > right way, but there are at least 99 mentions of "lambda" in the 3.3 > standard library: > > steve@runes:/usr/local/lib/python3.3$ grep lambda *.py | wc -l > 99
I'm not too lazy to do it the right way, but I don't have 3.3 handy, so I've done it on 3.4 instead. There are 77 instances of lambda nodes in the files you list there - which are the ones that aren't in packages. (Note that two instances of lambda on the same line would count as one in Steven's figure, but as two in mine. Also, his counts comments. Still, his way's a lot easier to calculate, and it's in the right ball-park.) Including all subdirectories raises that figure to, get this, 1230. That's actual uses of the lambda keyword as parsed by Python. This does include the test suite, though. Removing all files with "/test/" in the names cuts that figure to only 273. But that's still two hundred and seventy-three places where the Python standard library uses lambda - a respectable figure. ChrisA -- https://mail.python.org/mailman/listinfo/python-list