3 ms·
Coming from Mathematica to Python, the lack of a assignment expressions yet inclusion of list comprehensions felt like a severe crippling of the language featur
by boublepop 7y ago
Coming from Mathematica to Python, the lack of a assignment expressions yet inclusion of list comprehensions felt like a severe crippling of the language feature. Sure you “can still do the same through other means”, just like if, for and while are all unnecessary syntactic sugar in every language. But the thing is that list comprehensions provide a nice obvious concise way to frame your solution, but if you use it without assignment expressions you often end up repeating computations unnecessarily.