# Conditional elements/arguments

**URL:** <https://discuss.python.org/t/conditional-elements-arguments/26567>\
**Category:** Ideas\
**Created:** [May 6, 2023, 7:58pm UTC](https://discuss.python.org/t/conditional-elements-arguments/26567 "2023-05-06T19:58:59Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![ntessore](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ntessore/32/10786_2.png) [@ntessore](https://discuss.python.org/u/ntessore)\
**Post date:** [May 10, 2023, 7:11pm UTC](https://discuss.python.org/t/conditional-elements-arguments/26567/22 "2023-05-10T19:11:38Z")

</div>

> [@Rosuav](#):
>
> Yeah, but the elegance of writing `@list` would have been very tempting!

> [@Rosuav](#):
>
> The hard part is finding which subset of that power is useful enough and/or common enough to warrant its own dedicated shorthand syntax.

This is one of the reasons why PEP 638 might fill a real gap. As I understand it, we could without much effort have a `list!` macro that expands into the generator you wrote, and assembles the list.

---

_[View the full topic](https://discuss.python.org/t/conditional-elements-arguments/26567)._
