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
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@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@luc.edu Chicago, Illinois 60611
Any opinions?
-Winston
I'm generally against making any changes to Python syntax (even when it comes to adding redundant options) where the justification involves "making it easier for kids to..." I don't think that's an appropriate justification for cluttering up the language. On the other hand, it's an open source language and you're perfectly free to customize a classroom edition that does as you describe. It'd be a mutant edition though, not mainstream Python. ...Would be my preference. Kirby
I also teach Python in that age range and I've seen the same confusion, so I know what you mean. OTOH, I wonder if it's worth a change in the language to delay facing the fact that code is not algebra. It's always seemed to me that once they get the idea that code doesn't necessarily follow the rules of algebra (which it doesn't in many ways) the symbol isn't such a big deal. And maybe it's all of that Pascal (and Delphi) code still giving me nightmares, but reviving ":=" gives me the willies... :) JMHO, Vern 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@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137
On May 11, 2006, at 9:50 AM, Vern Ceder wrote:
I also teach Python in that age range and I've seen the same confusion, so I know what you mean. OTOH, I wonder if it's worth a change in the language to delay facing the fact that code is not algebra.
It's always seemed to me that once they get the idea that code doesn't necessarily follow the rules of algebra (which it doesn't in many ways) the symbol isn't such a big deal.
You have a good argument. I suppose since they'll need to differentiate algebra and Python soon enough, and it's just another little thing they'll have to remember. -Winston ______________________________________________________ winston wolff - (646) 827-2242 - http://www.stratolab.com learning by creating - video game courses for kids in new york
On 5/11/06, Winston Wolff <winstonw@stratolab.com> 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 # :-) Many students will be familiar with ":" meaning division or ratio. In the context above, what would you think a := 1 should mean? Sooner or later, students have to learn that equality is (tested with) "==" in Python, not with "=". "There should be one-- and preferably only one --obvious way to do it." I don't believe in adding special notation specifically designed for beginner's sake - even though I am dedicated in making Python as easy to learn as possible. André
-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@python.org http://mail.python.org/mailman/listinfo/edu-sig
On 5/11/06, Winston Wolff <winstonw@stratolab.com> 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 Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
participants (5)
-
Andre Roberge
-
Andrew Harrington
-
kirby urner
-
Vern Ceder
-
Winston Wolff