Curious assignment behaviour

John Roth johnroth at ameritech.net
Mon Oct 8 11:28:21 EDT 2001


"Richard Brodie" <R.Brodie at rl.ac.uk> wrote in message
news:9pseug$jj0 at newton.cc.rl.ac.uk...
>
> "Dale Strickland-Clark" <dale at riverhall.NOSPAMco.uk> wrote in message
> news:8tb3stc5jcqfc0mh8eijmon4pnfa501loj at 4ax.com...
>
> > 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