[Python-Dev] The `for y in [x]` idiom in comprehensions
Mike Miller
python-dev at mgmiller.net
Sat Feb 24 12:33:54 EST 2018
More information about the Python-Dev mailing list
Sat Feb 24 12:33:54 EST 2018
- Previous message (by thread): [Python-Dev] The `for y in [x]` idiom in comprehensions
- Next message (by thread): [Python-Dev] The `for y in [x]` idiom in comprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm not sure, I found the "with f(x) as y" form previously mentioned the most readable despite it being a new use case, while not needing new keywords. -Mike On 2018-02-23 22:07, David Mertz wrote: > FWIW, the nested loop over a single item is already in the language for 15 years > or something. It's not that ugly, certainly not enough to need a new 'let' or > 'where' keyword that basically does exactly the same thing with 3 fewer characters. > > On Feb 23, 2018 10:04 PM, David Mertz <mertz at gnosis.cx <mailto:mertz at gnosis.cx>> > wrote:
- Previous message (by thread): [Python-Dev] The `for y in [x]` idiom in comprehensions
- Next message (by thread): [Python-Dev] The `for y in [x]` idiom in comprehensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list