[Edu-sig] Setting a variable's value
Andrew Harrington
aharrin at luc.edu
Thu May 11 15:40:27 CEST 2006
Winston,
I like the pedogogy for a math teacher. I think I could even see it in
a regular Python course for maybe the first day.
I don't think it could be misinterpreted by interpreter or human.
I would suggest including in the proposal an optional directive that
would force the use of := like we have now for // and /.
The question comes, then what about equality testing?
Going to single = from double = would never fly, but I guess giving a
meaning to unusual symbols like := and == is much less confusing than a
nonstandard (mathematically) use of =.
Andy
Winston Wolff 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?
>
>-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
>Edu-sig at python.org
>http://mail.python.org/mailman/listinfo/edu-sig
>
>
--
Andrew N. Harrington
Computer Science Department Undergraduate Program Director
Loyola University Chicago http://www.cs.luc.edu/~anh
512B Lewis Towers (office) Office Phone: 312-915-7982
Snail mail to Lewis Towers 416 Dept. Fax: 312-915-7998
820 North Michigan Avenue aharrin at luc.edu
Chicago, Illinois 60611
More information about the Edu-sig
mailing list