[Python-ideas] Framework for Python for CS101

Andrew Barnert abarnert at yahoo.com
Mon May 25 10:01:10 CEST 2015


On May 24, 2015, at 22:06, Rustom Mody <rustompmody at 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?

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.

> Now note that while the larger changes would in general be restrictions, ie subsetting standard python, they may not be easily settable in PYTHONSTARTUP.
> eg sorted function and sort method confusion
> extend/append/etc mutable methods vs immutable '+'
> 
> Now different teachers may like to navigate the world of python differently.
> So for example I prefer to start with the immutable (functional) subset and go on to the stateful/imperative.  The point (here) is not so much which is preferable so much as this that a given teacher should have the freedom to chart out a course through python in which (s)he can cross out certain features at certain points for students.  So a teacher preferring to emphasise OO/imperative over functional may prefer the opposite choice.
> 
> [Aside:  ACM curriculum 2013 juxtaposes OO and FP as absolute basic in core CS 
> https://www.acm.org/education/CS2013-final-report.pdf
> pgs 157,158
> ]
> 
> So the idea is to make a framework for teachers to easily configure and select teachpacks to their taste.
> 
> How does that sound?
> 
> Rusi
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150525/dbd11e55/attachment.html>


More information about the Python-ideas mailing list