4 ms·
What special-case syntax? The only brazenly pythonic thing in there was the (iterative) tuple unpacking, as in (for) k, v in dic.items() which is just k, v =
by genidoi 7y ago
What special-case syntax? The only brazenly pythonic thing in there was the (iterative) tuple unpacking, as in
(for) k, v in dic.items()
which is just
k, v = (<key>, <value>) for every key value pair in the dictionary
- grzm 7y agoThere are a number of precedence rules you need to keep track of to parse the list comprehension. There are two different syntaxes that do the same thing. Arguably you need to do the same if you don't already know how the threading macro in the my second example works. I posted due to your claim regarding all other languages necessitating increased verbosity. I should have left it lie, as I didn't intend to promote a language war, just to post a counter example. My apologies.
- genidoi 7y agoNo language war intended, just curious how something I see as a wheel could be improved.