On 5/11/06, Winston Wolff <[EMAIL PROTECTED]> wrote: > I'm considering a proposal for Python 3000 and want to get some other > opinions. I propose adding an alternative syntax for assigning a > value to a variable so that the Python statement: > a = 1 > could also be written: > a := 1 > The reason is to help students who are familiar with the Algebraic > meaning of "a = 1" (a is always equal to one) and get confused when > the Python meaning of "a = 1" (put the value of one into the variable > a). > > I teach middle and high-school students who are learning Algebra at > the same time as Python, and it is very confusing to them when the > same symbols mean two subtly different things. I would propose that > the second syntax (a := 1), be available so that I could introduce > that in the first semester course. Later, once they understood the > meaning of "a := 1", they could switch the shorter syntax "a = 1". > > Any opinions? > Since you ask!...
I do not like it. In Python you can do things like a += 1 a -= 1 a *= 1 a /= 1 # :-) Students will be familiar with ":" meaning div > -Winston > > > > ______________________________________________________ > winston wolff - (646) 827-2242 - http://www.stratolab.com > learning by creating - video game courses for kids in new york > > > _______________________________________________ > Edu-sig mailing list > [email protected] > http://mail.python.org/mailman/listinfo/edu-sig > _______________________________________________ Edu-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/edu-sig
