Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'interpreter': 0.05; 'output': 0.05; 'subject:Python': 0.06; 'debug': 0.07; 'nicely': 0.07; 'feature,': 0.09; 'main()': 0.09; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; '(other': 0.16; 'caring': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'it),': 0.16; 'keyword.': 0.16; 'script,': 0.16; 'started:': 0.16; 'subject:programming': 0.16; 'such,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'module': 0.19; 'thu,': 0.19; 'unlike': 0.19; 'later': 0.20; 'foundation': 0.20; 'seems': 0.21; 'memory': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'instead.': 0.24; 'interpret': 0.24; 'lets': 0.24; 'space.': 0.24; 'stick': 0.24; 'cc:2**0': 0.24; 'logging': 0.26; 'possibly': 0.26; 'least': 0.26; 'subject:/': 0.26; '(for': 0.26; 'header:In-Reply- To:1': 0.27; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'program,': 0.31; 'cgi': 0.31; 'keys': 0.31; 'steven': 0.31; 'figure': 0.32; 'languages': 0.32; 'open': 0.33; 'could': 0.34; 'problem': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'found.': 0.36; 'tight': 0.36; 'should': 0.36; 'wrong': 0.37; 'starting': 0.37; 'step': 0.37; 'filter': 0.38; 'requiring': 0.38; 'pm,': 0.38; '12,': 0.39; 'even': 0.60; 'around.': 0.60; 'most': 0.60; 'browser': 0.61; "you're": 0.61; 'back': 0.62; 'more': 0.64; 'between': 0.67; 'default': 0.69; 'presented': 0.69; 'car': 0.72; 'ending': 0.78; 'built,': 0.84; 'hood': 0.84; 'lying': 0.84; 'plays': 0.84; 'unacceptable': 0.84; 'bless': 0.91; 'pipeline': 0.91; 'probe': 0.91; 'rusi': 0.91; 'to:none': 0.92; 'imagine': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=8FIDqA8SG249zytiQRZElVl4StLU0BRKnGQclkQBY8Q=; b=fsTqtf1QcF4KeoYkXXtfA1I1X2VKfos/0S+v3WcRQ81DfowPJ/L2UjGeDJN9eIC9q4 FSPuhfNo73sQeZJDSIg+8oQIimi2PaLkV5JtcvjMTfMFqhmscxuyPS4zF7zJ3z2w2uo6 zakY9amE6DNLCSpZkd4LCV5ZihfIpHvxmFGax2jL5r5vY3r4/Z+PQSTcS5JPISqR8wFY qw9DA8SIQbYJThq+flSezZSA77flhbyoeEamCEfKn3r4cjnDzbROhUfe4lDFsK6FbxRa 7fOAOvgOIj6CIcskr7AEA2bN7POEAl06vr6epxlUw95HDQcompnV7l8vohvAtcorlXa0 C7IA== MIME-Version: 1.0 X-Received: by 10.68.248.33 with SMTP id yj1mr7835500pbc.45.1386822048000; Wed, 11 Dec 2013 20:20:48 -0800 (PST) In-Reply-To: References: <201312090824.25211.gheskett@wdtv.com> <52A78F6F.3060507@stoneleaf.us> Date: Thu, 12 Dec 2013 15:20:47 +1100 Subject: Re: Experiences/guidance on teaching Python as a first programming language From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386822056 news.xs4all.nl 2843 [2001:888:2000:d::a6]:36431 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61658 On Thu, Dec 12, 2013 at 2:52 PM, rusi wrote: > Which comes back full-circle to where we started: if > > main() { printf("Hello World\n"); } > > is the foundation on which other programs are built, then later excising > the print(f) is a significant headache -- at least for teachers as Steven > also seems to have found. > > If instead the print was presented more as a 'debug' -- when something > goes wrong stick a probe in there and figure the problem -- then > leaving it there would be as unacceptable as a car mechanic giving you > your keys with the hood open and parts lying around. Console output isn't just a debug feature, though - and if you're using it as such, you possibly should be using the logging module instead. It's the most fundamental form of output. It plays nicely with shell redirection and long pipelines, which means it automatically lets you work with something larger than memory or even disk. Imagine starting a pipeline with a decompression step (eg gzip -d), and ending it with a tight filter (eg grep) - everything in between could manipulate any amount of data at all, without caring about storage space. Console output works in the REPL, works in the default interpreter (other than pythonw.exe which suppresses it), works across SSH... if your most normal form of output is a GUI, that's not always true. Console output works without requiring any other program, too, unlike (for instance) a CGI script, which needs a web browser to interpret its output. There's a reason many languages bless it with a keyword. ChrisA