# map(lambda, …)) over genexp
This [[anti-pattern]] is a [[readability]] and maintainability issue. The issue is from having to send a [[Anonymous Function|lambda function]] to [[map]], which is not required using a [[GenExp - Generator Expression|genexp]] and add boilerplate code.
It happens often from people used to [[map]] and other functional tools from other fields or languages. In [[Python]], the [[GenExp - Generator Expression|GenExp]] is a well-known and more human friendly syntax that is recommended.
```python
# Don't
map(lambda obj: obj["data"], src)
# Do
(obj["data"] for obj in src)
```
---
Bibliography:
- [Title - website.com](need bibliography)