Curious assignment behaviour
dale at riverhall.NOSPAMco.uk
Mon Oct 8 15:58:54 CEST 2001
"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.
Riverhall Systems Ltd
More information about the Python-list