From: Wayne Scott Date: 2000-08-01T21:42:22-07:00 Subject: [ruby-talk:04304] Re: basic ops in some languages From: faatdilac@my-deja.com > Why the following works in Perl: > > $a = ($b = 2) * 3; > > and Ruby: > > a = (b = 2) * 3 > > but not in Python: > > a = (b = 2) * 3 In Python 'var = expr' is a statement. It is NOT an expression and doesn't return a value. The prevents errors like 'if (i = 5)' when you ment '=='. I don't think it is worth it. I like making assignment ':=' (like pascal). The makes the typo much harder visually. -Wayne