4 ms·
Guido wanted to kick out map and filter in Python 3000 but there was community out there using these two, God knows for what reasons. As long as the lambda is l
by sharjeel 18y ago
Guido wanted to kick out map and filter in Python 3000 but there was community out there using these two, God knows for what reasons. As long as the lambda is limited to single expressions, map and filter are pretty much useless; and lambda is going to stay like that due to the way Python handles scoping using indentation.
- deleted 18y ago[deleted]
- evgen 18y ago> As long as the lambda is limited to single expressions, map and filter are pretty much useless Not really. It is not too difficult to actually define a named function and the code usually ends up being easier to read/understand so that lack of multi-line lambdas is not a serious problem. Additionally, now that map and filter return iterators they are a bit more flexible than they used to be. OTOH, if you are using map and filter in your python code you should probably take a close look at what you are attempting to accomplish and see if a generator expression might do the job better.
- tome 18y agoHe didn't want to remove them, he just wanted to move them out of the global namespace.