[Python-ideas] Framework for Python for CS101

Rustom Mody rustompmody at gmail.com
Mon May 25 07:06:00 CEST 2015


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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150525/6ab9742e/attachment.html>


More information about the Python-ideas mailing list