3 ms·
It has each i in list: ... each i in generator: ... each i in 0..9: ... # where 0..9 is a set, but this # construct is optimized d
by mojuba 18y ago
It has
each i in list: ...
each i in generator: ...
each i in 0..9: ... # where 0..9 is a set, but this
# construct is optimized down
# to a plain incremental loop
or in case I choose C style:
each (i = list) ...
each (i = generator) ...
each (i = 0..9) ...
- earthboundkid 18y agoHere's my advice about the most important thing Python does: >>> if x = y: File "<stdin>", line 1 if x = y: ^ SyntaxError: invalid syntax Why is this important? Because it's such a damnably subtle bug. But what if people want to do something like if r = get_result(): r.do_something()? Make them write if r with r as get_result(): r.do_something() instead.