Curious assignment behaviour

John Roth johnroth at
Mon Oct 8 17:28:21 CEST 2001

"Richard Brodie" <R.Brodie at> wrote in message
news:9pseug$jj0 at
> "Dale Strickland-Clark" <dale at> wrote in message
> news:8tb3stc5jcqfc0mh8eijmon4pnfa501loj at
> > So how about an alternative assignment operator that can't be confused
> > with equality but which yeilds the assigned value?
> >
> > Pascal uses :=
> Nope. Pascal is like Python, it doesn't have an assignment operator.

But it does have a *syntax* that means assignment, just like Python.
I believe that is what the poster had in mind.

There are a few cases where I would like to do an assignment in the
middle of an expression; the much abused lambda function comes to
mind immediately.

I kind of like ":=".

John Roth

More information about the Python-list mailing list