[Python-ideas] Fwd: New suggested built in keyword: do
mike at selik.org
Sat Jun 9 02:27:08 EDT 2018
The benefit of list, dict, and set comprehensions and generator expressions
is that they evaluate, as opposed to simply exec. The purpose of making
them one-liners is to allow them to be assigned to a variable or passed as
If you're not assigning or passing, then why not use a newline character?
"Sparse is better than dense."
On Friday, June 8, 2018 at 7:13:07 AM UTC-7, Randy Diaz wrote:
> I think that the keyword do would solve problems that occur when people
> want a simple way to run a command over an iterable but they dont want to
> store the data.
> do print(x) for x in range(50)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas