On 22 Mar 2005 06:32:38 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> The for definition could be like this: > > for_stmt ::= "for" target_list "in" expression_list > [ "until" expression ] ":" > suite ["else" ":" suite] > > or some other word that clarifies the work of the expression > > leave_cond_1 = False > leave_cond_2 = False > mylist = [1,2,3,4,5] > for item in mylist until leave_cond_1 or leave_cond_2: > print item Still, this can be acomplished with the break statement, in a more clear way, with less variables (which implies less work for the gc and everybody). In your example, instead of verifying some condition and setting leave_cond_n to True, you just check the same condition, and use break. . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://pyar.decode.com.ar/ -- http://mail.python.org/mailman/listinfo/python-list