beginner, idiomatic python
david at asdf.asdf
Mon Aug 27 07:21:37 CEST 2007
"Alex Martelli" <aleax at mac.com> wrote in message
news:1i3h176.kjfosu1ly2afyN%aleax at mac.com...
> 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.
More information about the Python-list