Error:[{key: row for key, row in zip(("port", "state", "resolution"), parsed)} for parsed in [[data[0], f"{data[1]} {data[2]}", data[3]] if "primary" in (data := e.split()) else data[:3] for e in subprocess.run(["xrandr"], capture_output=True, encoding="utf8").stdout.splitlines() if " connected" in e]]
^
SyntaxError: assignment expression cannot be used in a comprehension iterable expression

I was trying to push it further and further.
At some point, as I tried to put a list-comprehension inside a list comprehension, where the elements are a dictionary comprehension...
But there was the assignment expression as big problem. I guess it's not allowed to prevent bad side effects.
🛈 What I've learned: You can't use the walrus operator anywhere in nested inner
list/set/dict comprehensions
. As well, generator expressions
.Holy cow, that they were able to be so concise.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!