Sunday, January 11, 2009

Another way to think about lambda

Until now I had problems understanding the lambda statement. I did not know how is it used and what does it actually do. The description in the Python documentation did explain it but not easy enought to remember it.

Now I have thought of something which helps me remember the purpose of lambda and its syntax.

It's the same like functions in the math class:

f(x) = x+1

is the same as:

lambda x: x + 1

43 comments:

Anonymous said...

很好啊 ..................................................

天兵 said...

看看blog調整心情,又要來繼續工作,大家加油.........................

寶貝別哭 said...

喜樂的心是健康良藥,憂傷的靈使骨枯乾。........................................

Anonymous said...

你可以從外表的美來評論一朵花或一隻蝴蝶,但你不能這樣來評論一個人........................................

早餐 said...

一葉情人妻激情情色寫真美女自拍辣妹自拍正妹自拍美女走光辣妹走光正妹走光脫衣秀脫衣走光色情自慰自拍成人全裸打炮打手槍打飛機巨乳巨奶女優大奶性交性愛淫蕩淫慾淫亂淫婦淫妹淫叫淫水淫女

Anonymous said...

與其爭取不可能得到的東西,不如善自珍惜運用自己所擁有的........................................

仁南 said...

how do u do?................................................................

Anonymous said...

唯有學習不已的老師,才能認真的教,唯有燃燒自己,才能點亮他人的燈......................................................

Anonymous said...

一個人的快樂,不是因為他擁有的多,而是他計較的少。..................................................

Anonymous said...

激情成人聊天室情色成人辣妹胸部辣妹視訊露奶辣妹自拍三點全露內衣秀台灣成人貼圖成人電影院三點全裸免費視訊辣妹av圖裸體自拍色情聊天美女視訊g點色情訊息淫女火辣av辣妹圖片免費視訊聊天室情色天空調情上床圖片裸體自拍走光照片走光視訊情色成人18成人區火辣美女成人vcd成人影片下載本土av性愛情慾淫妹美女聊天性愛聊天室女生自慰影片免費看a圖淫婦巨乳辣妹視訊成人女生自慰方法免費情色限制級a片穿幫情色下載情色網站

Anonymous said...

Better say nothing than nothing to the purpose. ........................................

Anonymous said...

以簡單的行為愉悅他人的心靈,勝過千人低頭禱告。........................................

Anonymous said...

感謝是愛心的第一步........................................

JesseniaT_Or怡臻ndorf said...

良言一句三冬暖,惡語傷人六月寒。..................................................

Anonymous said...

感覺很好的blog,祝你開心喔..................................................

Anonymous said...

找一個懂妳的人也期許自己做一個人懂別人的人......................................................

Anonymous said...

Knowledge is power.............................................................

Anonymous said...

A liar is not believed when he speaks the truth. ........................................

定治定治 said...

Necessity is the mother of invention...................................................................

Anonymous said...

Where did you purchase this product?..................................................

Anonymous said...

在莫非定律中有項笨蛋定律:「一個組織中的笨蛋,恆大於等於三分之二。」......................................................................

嘉惠 said...

生存乃是不斷地在內心與靈魂交戰;寫作是坐著審判自己。.................................................................

Anonymous said...

人不能像動物一樣活著,而應該追求知識和美德............................................................

Anonymous said...

人生是故事的創造與遺忘。............................................................

Anonymous said...

It takes all kinds to make a world.............................................................

Anonymous said...

加油-不論如何都支持你............................................................

Anonymous said...

快樂,是享受工作過程的結果............................................................

Anonymous said...

流浪到這裡,留言謝謝你。............................................................

Anonymous said...

唯有學習不已的老師,才能認真的教,唯有燃燒自己,才能點亮他人的燈............................................................

Anonymous said...

第一忠誠,第二勤奮,第三專心工作。..................................................

Anonymous said...

People throw stones only at trees with fruit on them.............................................................

Anonymous said...

成熟,就是有能力適應生活中的模糊。............................................................

Anonymous said...

良言一句三冬暖,惡語傷人六月寒。......................................................................

Anonymous said...

知識可以傳授,智慧卻不行。每個人必須成為他自己。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Anonymous said...

拒絕冒險和成長的人,終將被生命的潮流陶汰。..................................................

建邱勳 said...

享受你自己的生活,不要與他人相比。.......................................................

Anonymous said...

happy to read~ thank you!............................................................

Anonymous said...

如果成為一支火柴,也要點亮一個短暫的宇宙;如果是一隻烏鴉,也要叫疼閉塞的耳膜。............................. ...................................

Anonymous said...

相見亦無事,不來常思君......................................................................

Anonymous said...

君子立恆志,小人恆立志。................. ................................................

Anonymous said...

好的部落格就要和好朋友分享--感謝分享..................................................

Anonymous said...

真正的朋友不會把友誼掛在嘴巴上......................................................................

Anonymous said...

成功可招引朋友,挫敗可考驗朋友......................................................................