Curious assignment behaviour

Richard Brodie R.Brodie at rl.ac.uk
Mon Oct 8 12:29:46 EDT 2001


"John Roth" <johnroth at ameritech.net> wrote in message news:ts3hb2p7dbh7b5 at news.supernews.com...

> > > 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.

It's probably true that the use of := for assignment and = for equality is
less prone to error for those unused to C-like languages. I think it's a
lost battle though unless we want another controversial language change
in  Python 3 ;)

In Pascal, code with  =/:= confusion won't compile. Unfortunately, I
suspect that is much more significant than the symbols themselves.





More information about the Python-list mailing list