Re: [Tutor] Python as Teaching Language

2014-02-10 Thread Russel Winder
On Mon, 2014-02-10 at 00:17 +, Alan Gauld wrote: […] > And in my tutorial I deliberately don't teach many of the "standard" > Python idioms because I'm trying to teach programming rather than > Python. So if python has an insanely great way to do stuff but virtually > no other language has i

Re: [Tutor] Python as Teaching Language

2014-02-10 Thread Russel Winder
On Sun, 2014-02-09 at 13:36 +, Oscar Benjamin wrote: […] > I agree entirely, but what you've overlooked is that my examples are > carefully targeted at a particular part of a tutorial-based class. > We're talking about iteration so this is quite early in the course. At > this stage I want my st

Re: [Tutor] Python as Teaching Language

2014-02-09 Thread Alan Gauld
On 09/02/14 13:36, Oscar Benjamin wrote: We're talking about iteration so this is quite early in the course. At this stage I want my students to understand that closing a file is an explicit action that needs to occur. Later in the course I will teach exception handling and explain that the abov

Re: [Tutor] Python as Teaching Language

2014-02-09 Thread Oscar Benjamin
On 9 February 2014 13:28, Russel Winder wrote: > On Mon, 2014-01-20 at 10:41 +, Oscar Benjamin wrote: > [...] >> f = open('myfile.txt') >> for line in f: >> print(line.upper()) >> f.close() > > I suggest we even see this as not good code due to the possibility of > I/O exceptions: > >

Re: [Tutor] Python as Teaching Language

2014-02-09 Thread Russel Winder
On Mon, 2014-01-20 at 10:41 +, Oscar Benjamin wrote: […] > f = open('myfile.txt') > for line in f: > print(line.upper()) > f.close() I suggest we even see this as not good code due to the possibility of I/O exceptions: with open('myfile.txt') as f: for line in f:

Re: [Tutor] Python as Teaching Language

2014-01-20 Thread Oscar Benjamin
On Sun, Jan 19, 2014 at 02:18:54PM -0500, Keith Winston wrote: > On Sun, Jan 19, 2014 at 11:55 AM, Alan Gauld > wrote: > > It has reached the point that I'm back to looking for a new teaching > > language. In Python 3 the decision has clearly been made to focus on > > supporting Python's role as

Re: [Tutor] Python as Teaching Language

2014-01-19 Thread Alan Gauld
On 19/01/14 19:18, Keith Winston wrote: On Sun, Jan 19, 2014 at 11:55 AM, Alan Gauld wrote: It has reached the point that I'm back to looking for a new teaching language. ... But what else is there? that's the problem :-( Hi Alan, since this is off-topic from it's original thread, but I

[Tutor] Python as Teaching Language

2014-01-19 Thread Keith Winston
On Sun, Jan 19, 2014 at 11:55 AM, Alan Gauld wrote: > It has reached the point that I'm back to looking for a new teaching > language. In Python 3 the decision has clearly been made to focus on > supporting Python's role as a professional software engineering language > at the expense of being a s