hynek / first

The function you always missed in Python: return the first true value of an iterable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename pred to key

nvie opened this issue · comments

I believe key is the typical argname for stuff like this in Python. Take a look at how min(), max(), and sorted() also take a key argument. This is completely the same, so I think it's better to stick to known terminology.

(We might keep the pred arg for backwards-compatibility reasons.)

Closed in favor of #10.