Returns the first item in the list for which match(item) is True.
(match=lambda item: False, list=[])
| 54 | import pysqlite2.dbapi2 as sqlite |
| 55 | |
| 56 | def find(match=lambda item: False, list=[]): |
| 57 | """ Returns the first item in the list for which match(item) is True. |
| 58 | """ |
| 59 | for item in list: |
| 60 | if match(item) is True: |
| 61 | return item |
| 62 | |
| 63 | _sum = sum # pattern.db.sum() is also a column aggregate function. |
| 64 |