πŸ’­ Show some equivalent list comprehensions in filter examples Β· ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !https://github.com/pallets/jinja/issues/1068 Date: December 14, 2023 Image: Show some equivalent list comprehensions in filter examples Β· Issue #1068 Β· pallets/jinja β€” I'm willing to write a pull-request for this, but I just want to see what people think before I write it. So the issue is this. I'm very familiar with python. I'm new to Jinja2. Often I find myself... Show some equivalent list comprehensions in filter examples Β· Issue #1068 Β· pallets/jinja I'm willing to write a pull-request for this, but I just want to see what people think before I write it. So the issue is this. I'm very familiar with python. I'm new to Jinja2. Often I find myself... GitHub Β· github.com I often want to reach for non existing list comprehensions in jinja 2, Here are a few nice equivalents. ``` a: {{ data | selectattr('x', 'gt', 5) | list }} b: {{ data | map(attribute='c') | list }} c: {{ data | selectattr('x', 'gt', 5) | map(attribute='c') | list }} ``` NOTE β”‚ This post is a thought . It’s a short note that I make about someone else’s content online #thoughts