Curious assignment behaviour

Dale Strickland-Clark dale at
Mon Oct 8 15:58:54 CEST 2001

Thanks everyone.

	"assignment_stmt: (target_list "=")+ expression_list"

That little '+' escaped me.

I accept the confusion that the examples make possible:


are not desirable.

So how about an alternative assignment operator that can't be confused
with equality but which yeilds the assigned value?

Pascal uses :=
Another language (I forget which) uses <-

(I've always prefered := for assignment and a plain = for equality.)

I don't suppose I'm the first to suggest this, either.
Dale Strickland-Clark
Riverhall Systems Ltd

More information about the Python-list mailing list