On Sun, 2008-09-14 at 01:44 -0700, Cliff Wells wrote:
I'm probably replying way too fast (in fact, I know I am), but I have two thoughts on this:
- it seems to alter the semantics of "continue" too much when
considered against current syntax, but...
- with the new syntax, it seems not too bad because
j = range(3) for i in j: i # evaluates to [] for i in j: continue # evaluates to [] for i in j: continue i # evaluates to [0,1,2]
Bah, I knew I was replying too fast. I'm thinking that "continue" would be redefined to mean "yield value and continue" which means that
for i in j: continue # evaluates to [ None, None, None ] not []
would seem the most consistent, but I fear it might be less practical (as it would create problems trying to use for/continue inside other expressions, although the effect when for/continue is used as a statement remains fine).
Cliff
Overall I'm a bit torn on the idea. Thoughts?
Regards, Cliff
Python-ideas mailing list Python-ideas@python.org http://mail.python.org/mailman/listinfo/python-ideas