Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61658

Re: Experiences/guidance on teaching Python as a first programming language

References (4 earlier) <CAPTjJmpQ9bFP66j3p-PDb2Mp88GKWKktrcFRCWQtdo6fb8LHmA@mail.gmail.com> <mailman.3908.1386777719.18130.python-list@python.org> <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com> <roy-7CFB3C.20423211122013@news.panix.com> <f9c5c5e5-c299-41ed-89c3-8bb79171f638@googlegroups.com>
Date 2013-12-12 15:20 +1100
Subject Re: Experiences/guidance on teaching Python as a first programming language
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3958.1386822056.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Dec 12, 2013 at 2:52 PM, rusi <rustompmody@gmail.com> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-11 11:01 -0500
  Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 08:27 -0800
    Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-11 16:36 +0000
    Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 03:45 +1100
    Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 20:42 -0500
      Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-11 21:07 -0500
        Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 21:31 -0500
      The increasing disempowerment of the computer user (was: Experiences/guidance on teaching Python as a first programming language) Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:21 +1100
      Re: The increasing disempowerment of the computer user Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 02:35 +0000
      Re: The increasing disempowerment of the computer user Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:35 +1100
        Re: The increasing disempowerment of the computer user Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-12 10:59 +0000
          Re: The increasing disempowerment of the computer user David Hutto <dwightdhutto@gmail.com> - 2013-12-14 00:44 -0500
      Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 19:52 -0800
        Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 15:20 +1100
      Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-12 11:51 -0500
      Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-12 16:18 -0500
        Re: Experiences/guidance on teaching Python as a first programming language Frank Miles <fpm@u.washington.edu> - 2013-12-13 16:21 +0000

csiph-web