Ed Avis wrote: > Is there a way to write an expression which sets b and does return > something? an inline assignment can be written as: [b for b in [expr]] to return the assigned value, use: [b for b in [expr]][0] for example: >>> a = 10 >>> c = [b for b in [a+a]][0] + a >>> a 10 >>> b 20 >>> c 30 </F>