bambam <david at asdf.asdf> wrote: > Is it safe to write > > A = [x for x in A if x in U] > > or is that undefined? I understand that the slice operation It's perfectly safe and well-defined, as the assignment rebinds the LHS name only AFTER the RHS list comprehension is done. Alex