Python 代碼閲讀合集介紹:為什麼不推薦Python初學者直接看項目源碼
本篇閲讀的代碼實現了在列表中尋找符合條件的元素。
本篇閲讀的代碼片段來自於30-seconds-of-python。
find
def find(lst, fn):
return next(x for x in lst if fn(x))
# EXAMPLES
find([1, 2, 3, 4], lambda n
Scitools出品的Understand 2.0。用了很多年了,比Source Insight強大很多。以前的名字叫Understand for C/C++,Understand for Java,Understand for Ada,最近這幾年合併成了一個產品。
最值得一提的是各種關係圖的繪製,以及在這些圖上的交互操作:Declaration Graphs / Hier