Re:Show HN: Array – A Better Python List
by techdragon on Monday January 11, 2021 @03:31AM
(#25726240)
This is exactly the main situation where I'll happily "get clever" with my code.
It's not being reused and one of the following is true... I don't want to leave behind intermediary objects for whatever reason is relevant, or I feel its worth it to compress the logic to make it possible to use a language feature that requires an expression, like lambdas or list/dict comprehensions.
Though to be fair, having explicit intermediate variables is idiomatic in Python, from what I've seen. It's one of my biggest pet-peeves about the language, but it's not without precedent.