4 ms·
In fairness, the Python also should be broken up. It should be: [ found_node.get("value") for node in tree if (found_node := node.find(
by lukeschlather 8y ago
In fairness, the Python also should be broken up. It should be:
[
found_node.get("value")
for node in tree
if (found_node := node.find(SOME_XPATH)) is not None
]
I think I also prefer Ruby/Javascript style comprehensions, but it's worth comparing well formatted code.