Extending your enclose-in-list idea very slightly:
[2a for x in -20:20 for a = Ref(x) if a > 10]
Hopefully that is similar enough to your wished-for syntax in terms of readability.
Extending your enclose-in-list idea very slightly:
[2a for x in -20:20 for a = Ref(x) if a > 10]
Hopefully that is similar enough to your wished-for syntax in terms of readability.