= vs. == in Py3k
Mark Jackson
mjackson at wc.eso.mc.xerox.com
Fri Jun 9 12:50:24 EDT 2000
"Lawrence Kesteloot" <lk at veriomail.com> writes:
>
> If one of the goals of Python 3000 is to make it easy for new
> programmers to learn, how about removing the distinction
> between = and ==? The only kinds of examples I can think of
> where this is useful is something like:
>
> a = b = 5
>
> vs.
>
> a = b == 5
>
> But this isn't worth the trouble it gives new programmers. The
> syntax could be changed to make = and == equivalent tokens
> and have the parser figure out which is meant from the context,
But "=" and "==" have different *meanings*, and in Python the
difference is even bigger than in most languages. Anything that
muddies the meaning of assignment is no favor to new Python
programmers.
> just as it's done in Basic.
Another reason against. . .
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
You can never solve all difficulties at once.
- Paul Dirac
More information about the Python-list
mailing list