Re: Running beginner Pythons
André Roberge <[email protected]> Sun, 11 Oct 2015 17:19:47 +0000 (UTC)
| Newsgroups | gmane.comp.python.idle |
|---|---|
| Message-ID | <[email protected]> |
Terry Reedy <tjreedy <at> udel.edu> writes: > > Reconceptualizing for beginners... > > Many people working with kids have asked for various changes to Python > in order to make it easier for kids, sometimes very young. Some > variations have been requested more than once. > > 1. Simple looping: 'repeat/do/loop/for n [times]:' (take your pick of > keyword) versus 'for i in range(n):'. > > The latest request is by Andre Roberge, today on python-ideas, in > "Simpler syntax for basic iterations". This inspired me to write this > post. The education hook he offered is that the variation eliminates > the need for a loop variable in a context where variables are not > otherwise used. He has worked on robot programming for kids. Thanks for bringing this topic here and making me aware of this discussion. > > 2. Simple function call: 'move 3', 'turn 90' (Logo, I believe) versus > 'move(3)' 'turn(90)' (Turtle). > > 3. Simple Native language keywords. String-within-code translation is > not suited for this. Since you asked for "our thoughts": I would not use these myself, even when teaching in French to children that do not know English. I like the idea of using a "real programming language" that children can easily grow into. This is what motivated to create RUR-PLE originally (a Karel the robot implementation in Python) even though I was aware of the existence of the Python-like Guido van Robot. > > These are all things I think are wrong for Python itself but possibly > right for various learning situations. For 18 years I have watched > people try to change Python in ways like the above, when I think the > energy would be better directed to writing good quality translation > functions. > > Of course, the latter would be more inviting if there were a place to > plug them in. I think IDLE is quite well suited to be such a framework. > It would be possible now for one one alter Idle with a small patch -- if > the locations were documented. But I am thinking more about altering > Idle slightly to make patching unnecessary. > [snip] While I am definitely in favour of improving IDLE, I'm wondering if it would be possible to have an independent method, something like the __future__ module that could be imported within any context (i.e. not limited to IDLE), either explicitly (by the programmer) or implicitly (by the environment). I'm thinking of how one can, for example, write from __future__ import print_funtion to change the syntax used. In Reeborg's World (http://reeborg.ca/world.html), which also has a complete separate French version (http://reeborg.ca/monde.html), I have used this approach to make the functions defined in one language available in the other environment (and automatically updating the "help"). The required line of code is something like from reeborg_en import * (reeborg_fr also exists; reeborg_es was working ... but is now broken.) These imports do not modify the syntax, as it is pure Python (except for implementing "repeat n:" instead of "for var in range(n):" yesterday...) but they could easily be used to modify the syntax as well. Currently, they are tied to the web environment, but they could, in theory, be made into some independent module, useable anywhere (e.g. within IDLE...). > > IDLE would need to read, colorize, and write .pyx files. Isn't the .pyx extension already used by cython? André Roberge > Thoughts welcome. > -- > Terry Jan Reedy _______________________________________________ IDLE-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/idle-dev