Experiences/guidance on teaching Python as a first programming language

rusi rustompmody at gmail.com
Thu Dec 19 18:14:52 CET 2013

> On Thursday, December 19, 2013 9:46:26 AM UTC+5:30, Roy Smith wrote:
> >  rusi  wrote:

> > > Soon the foo has to split into foo1.c and foo2.c.  And suddenly you need to
> > > understand:
> > > 1. Separate compilation
> > > 2. Make (which is separate from 'separate compilation')
> > > 3. Header files and libraries and the connection and difference

> > It's pretty common here to have people ask questions about how import 
> > works.  How altering sys.path effects import.  Why is import not finding 
> > my module?  You quickly get into things like virtualenv, and now you've 
> > got modules coming from your source tree, from your vitualenv, from your 
> > system library.  You need to understand all of that to make it all work.

> Yes agreed. Python is far from stellar in this regard.
> Just as distutils got into the core at 2.3(??) now at 3.3 virtualenv(+pip+wheel)
> is getting in. Belated but better late than never.

> > None of that is specific to C.  Virtually any language (including 
> > Python) allows a program to be split up into multiple source files.  If 
> > you're running all but the most trivial example, you need to know how to 
> > manage these multiple files and how the pieces interact.

> Thats a strange thing to say.  In the abstract every language that
> allows for significant programs supports separate units/modules.

> Somewhere those units will map onto system entities -- usually though
> not always files (think of PL-SQL inside Oracle).

> Even assuming files, the lines drawn between interior (to the language)
> and exterior (OS-facing) are vastly different.

> C, Pascal, Python, Java, SML, APL -- all very different in this regard.

Just adding this:
Different languages do their modularizing and packaging differently (what I 
earlier said) in order to achieve different tradeoffs.

Here's a thread by a competent programmer who switched from Lisp to C++.
He clearly says that while he loves Lisp the language, its packaging facilities
lost out to C++ and so he rewrote his whole app in C++.

More information about the Python-list mailing list