3 ms·
Instead of lambda x: str(x), I'd just write str. I think this, and the P/S example, are both symptomatic of how Python (anthropomorphized) wants you to think a
by ken 18y ago
Instead of lambda x: str(x), I'd just write str.
I think this, and the P/S example, are both symptomatic of how Python (anthropomorphized) wants you to think about functions: they're things you stick parens after and call, not things you pass around on their own.
- mariorz 18y agoI still think the list comprehension is clearer than: map(str, filter(lambda x: x%2 is 0, range(100)))