On Mon, 15 Aug 2016 11:35:07 -0700, sohcahtoa82 wrote: > On Monday, August 15, 2016 at 8:07:32 AM UTC-7, alister wrote: >> On Mon, 15 Aug 2016 07:00:47 -0700, Sickfit92 wrote: >> >> > 1. How long did it take you guys to master the language or, let me >> > put it this way to completely get the hang and start writing code? >> > > <snip> >> Some concepts took more time than others before I had the "Light bulb" >> moment, Comprehensions & decorators being the most notable although >> Lambda still escapes me, fortunately these can all be unrolled into >> larger functions so are not essential in the early stages >> > <snip> > > What helped me understand Lambdas is figuring out that they're really > just a $1,000 term for a $5 concept. > > A lambda is just a single-line function without a name (Unless you > assign it to one). A syntactic shortcut. > > def square_plus_one(x): > return x ** 2 + 1 > > squared_plus_one_list = map(square_plus_one, some_list) > > is equivalent to: > > squared_plus_one_list = map(lambda x: x**2 + 1, some_list)
probably the cleanest example I have seen so far, & I still cant see the point the most enlightening thing here for me is your comet about it being a $1000 term for a $5 concept. I don't think I am missing anything by not bothering with them YMMV -- "The C Programming Language -- A language which combines the flexibility of assembly language with the power of assembly language." -- https://mail.python.org/mailman/listinfo/python-list