On Monday, May 25, 2015 at 1:31:58 PM UTC+5:30, Andrew Barnert via Python-ideas wrote:
On May 24, 2015, at 22:06, Rustom Mody <rusto...@gmail.com> wrote:

Context:  A bunch of my students will be working with me (if all goes according to plan!!)to hack on/in CPython sources.

One of the things we would like to try is a framework for CS101 [Intro to programming]

So for example beginners get knocked out by None 'disappearing' from the prompt
Correctable by

>>> import sys
>>> sys.displayhook = print

Now of course one can say: "If you want that behavior, set it as you choose"
However at the stage that beginners are knocked down by such, setting up a pythonstartup file is a little premature.

So the idea (inspired by Scheme's racket) is to have a sequence of 'teachpacks'.
They are like concentric rings, the innermost one being the noob ring, the outermost one being standard python.

How exactly does this work? Is it basically just a custom pythonstartup file that teachers can give to their students? Maybe with some menu- or wizard-based configuration to help create the file? Or is this some different mechanism? If so, what does setting it up, and distributing it to students, look like?

Frankly Ive not thought through these details in detail(!)
 
I realize that below you talk about doing things that are currently not easy to do in a pythonstartup, like hiding all mutating sequence methods, but presumably the patches to the interpreter core would be something like adding hide_mutating_sequence_methods() and similar functions that teachers could then choose to include in the pythonstartup file or whatever they give out.


I personally would wish for other minor surgeries eg a different keyword from 'def' for generators.
From the pov of an experienced programmer the mental load of one keyword for two disparate purposes is easy enough to handle and the language clutter from an extra keyword is probably just not worth it.
However from having taught python for 10+ years I can say this 'overloading' causes endless grief and slowdown of beginners.

Then there is even more wishful thinking changes -- distinguishing procedure from function.
After 30 years of Lisp and ML and ... and Haskell and square-peg-into-round-holing these into python, Ive come to the conclusion that Pascal got this distinction more right than all these.  However I expect this surgery to be more invasive and pervasive than I can handle with my (current) resources.
etc
etc
In short I am talking of a language that is morally equivalent to python but cosmetically different and is designed to be conducive to learning programming