On Nov 17, 9:28 am, Jonathan Saxton <jsax...@appsecinc.com> wrote: > And if I ever find the genius who had the brilliant idea of using = to mean > assignment then I have a particularly nasty dungeon reserved just for him. > Also a foul-smelling leech-infested swamp for those language designers and > compiler writers who followed his example. (Come to think of it, > plagiarizing a bad idea is probably the worse evil.)
I think every new programmer wrestles with this dilemma in their first days but very soon after accepts it as reality. As for me it made perfect sense from day one to have '=' mean "assignment" and '==' to mean "equality". Programming is not mathematics (on the contrary) they are two sides of a mountain forever unknowing of each other but sharing the same space. I think the syntax was chosen because the alternatives are even worse AND since assignment is SO common in programming, would you *really* rather type two chars instead of one? -- http://mail.python.org/mailman/listinfo/python-list