Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77551
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'read.': 0.03; 'output': 0.05; 'subsequent': 0.05; 'subject:Python': 0.06; 'assuming': 0.09; 'output,': 0.09; 'percentage': 0.09; 'vast': 0.09; 'will,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'gui': 0.12; 'changes': 0.15; 'examples:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guessing': 0.16; 'logger': 0.16; 'scripts.': 0.16; 'simplest': 0.16; 'stderr': 0.16; 'unfair': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'library': 0.18; 'module': 0.19; 'producing': 0.19; 'thu,': 0.19; 'examples': 0.20; '>>>': 0.22; 'otherwise,': 0.22; 'saying': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'error': 0.23; 'directory.': 0.24; 'instance,': 0.24; 'library,': 0.24; 'why.': 0.24; 'versions': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'generally': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'that.': 0.31; 'comparison': 0.31; "d'aprano": 0.31; 'default,': 0.31; 'directory,': 0.31; 'produces': 0.31; 'sep': 0.31; 'steven': 0.31; 'though.': 0.31; 'stuff': 0.32; 'text': 0.33; 'cases': 0.33; 'maybe': 0.34; 'basic': 0.35; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'programming,': 0.36; 'should': 0.36; 'application': 0.37; 'server': 0.38; 'pm,': 0.38; 'bad': 0.39; 'how': 0.40; 'even': 0.60; 'most': 0.60; 'skip:* 10': 0.61; 'simple': 0.61; "you'll": 0.62; 'more': 0.64; 'teach': 0.65; 'between': 0.67; 'invalid': 0.68; 'normal.': 0.68; 'of:': 0.68; 'obvious': 0.74; 'counted,': 0.84; 'facility.': 0.84; 'firing': 0.84; 'hanging': 0.84; 'to:none': 0.92 |
| 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=Ci9mFw8lDg8NS5Sd+vWi0U6hHhM4skKckRdsmEbmny8=; b=mjHsIDsvithRa/fbfMO3/Nb1MTfDPQPb1a9DeRRd4LnAfs2W5fEct9NBWqLDghqns/ /7ReoI8acvGaTTr3Cyxd3AxpihFTiGJ32UJIpvAc2txILBf8GlgSOlASUUhiehcDTxlz ibpmZgutJJBKHgX8f92Hy8xeTEBOs+uuhFKlnTYwTXiKnpsY+v6a/wxYJ9Qv36e2ezOO L4t4F4ckHN0B2kxbqhu6TYsL23mDZ4CwUaYkIC2233zm3q1nCLW61T68I81tKD+gcFUE tQfEMiFsbLoAhZ9cvOm1JkeDIA0lyKdYEOVmHgl3ggv8hBCXwhBK95Meu7+bVtN17aa/ DN+g== |
| MIME-Version | 1.0 |
| X-Received | by 10.50.176.202 with SMTP id ck10mr7633116igc.2.1409839702979; Thu, 04 Sep 2014 07:08:22 -0700 (PDT) |
| In-Reply-To | <54086b15$0$29977$c3e8da3$5496439d@news.astraweb.com> |
| References | <d9me0ap5s0s28qaeobbh6680gciel6c1og@4ax.com> <51acfec6-6b7b-4773-8d70-0360381bbed1@googlegroups.com> <mailman.13751.1409795794.18130.python-list@python.org> <d80e4c36-74e8-4850-8ad1-e357e895abcc@googlegroups.com> <mailman.13756.1409802577.18130.python-list@python.org> <4c873e02-93b1-4ad3-bc91-566a72b8e729@googlegroups.com> <mailman.13760.1409806953.18130.python-list@python.org> <99df9997-474e-4190-8179-6c1442b622a2@googlegroups.com> <mailman.13762.1409812788.18130.python-list@python.org> <54086b15$0$29977$c3e8da3$5496439d@news.astraweb.com> |
| Date | Fri, 5 Sep 2014 00:08:22 +1000 |
| Subject | Re: Python is going to be hard |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <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 <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13770.1409839706.18130.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1409839706 news.xs4all.nl 2961 [2001:888:2000:d::a6]:43283 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:77551 |
Show key headers only | View raw
On Thu, Sep 4, 2014 at 11:37 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > Chris Angelico wrote: > >> On Thu, Sep 4, 2014 at 4:23 PM, Rustom Mody <rustompmody@gmail.com> wrote: >>> You seem to think a print hanging out of a program to be ok, normal. >>> I consider it exceptional. >> >> You keep saying that it's exceptional. You haven't really said why. >> It's the simplest form of "program produces output for the human to >> see", which all of your subsequent examples are more complicated >> versions of: > > Out of the Python built-ins, how many functions (apart from print itself!) > print output instead of, or as well as, returning? > > Out of the standard library, what percentage of functions and methods print > output instead of, or as well as, returning? > > I haven't counted, but I'm guessing it will be well under 1%. There's a few > obvious examples: pprint.pprint, calendar.pr*, dis.dis, maybe a few more. > But I think they should be considered *exceptional*. This is an unfair comparison, though. There's a vast difference between library and application code. You also don't find library code that changes the current directory, but on the flip side, *every* job control system needs that facility. (With sysvinit, job control is shell scripts. With upstart and systemd, there are directives to set the working directory. Etcetera.) It's bad form for a library to produce console output, because it doesn't own the console; but the application does. The logger module will, by default, produce stderr output, because it's assuming the application owns it. Otherwise, it's generally up to the application to print stuff out. So a fairer comparison is: How many applications produce non-debug output on stderr or stdout? And that would be a much larger percentage. Even GUI programs will, in some cases - for instance, try firing up your favorite GUI text editor with no X server active, or with invalid .Xauthority. You'll get some sort of error message - on the console. Which means that somewhere in the GUI library, there's fall-back code that produces console output. That's why I say it's the most basic of all forms of that fundamental of programming, producing output that a human can read. It's the simple one that you teach first; everything else is built on that. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:10 -0400
Re: Python is going to be hard John Gordon <gordon@panix.com> - 2014-09-03 18:17 +0000
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:52 -0400
Re: Python is going to be hard mm0fmf <none@mailinator.com> - 2014-09-03 22:37 +0100
Re: Python is going to be hard Rock Neurotiko <miguelglafuente@gmail.com> - 2014-09-03 20:16 +0200
Re: Python is going to be hard Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-09-03 11:19 -0700
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:50 -0400
Re: Python is going to be hard MRAB <python@mrabarnett.plus.com> - 2014-09-03 19:24 +0100
Re: Python is going to be hard Skip Montanaro <skip@pobox.com> - 2014-09-03 13:28 -0500
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:52 -0400
Re: Python is going to be hard Ethan Furman <ethan@stoneleaf.us> - 2014-09-03 11:33 -0700
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:41 -0400
Re: Python is going to be hard Ethan Furman <ethan@stoneleaf.us> - 2014-09-03 12:49 -0700
Re: Python is going to be hard Juan Christian <juan0christian@gmail.com> - 2014-09-03 15:44 -0300
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:56 -0400
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 14:49 -0400
Re: Python is going to be hard Ethan Furman <ethan@stoneleaf.us> - 2014-09-03 11:55 -0700
Re: Python is going to be hard Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-09-03 12:01 -0700
Re: Python is going to be hard Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-03 13:11 -0600
Re: Python is going to be hard Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-03 15:22 -0400
Re: Python is going to be hard Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-04 12:11 +1000
Re: Python is going to be hard Denis McMahon <denismfmcmahon@gmail.com> - 2014-09-03 20:55 +0000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 18:48 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 11:56 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 19:10 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 12:25 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 19:33 -0700
Re: Python is going to be hard alister <alister.nospam.ware@ntlworld.com> - 2014-09-04 10:29 +0000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-04 06:08 -0700
Re: Python is going to be hard Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-04 23:25 +1000
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 23:55 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 20:22 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 13:49 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 21:11 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 15:02 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 23:23 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 16:39 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-04 06:15 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-04 23:30 +1000
Re: Python is going to be hard Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-04 23:37 +1000
Re: Python is going to be hard Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-09-04 15:04 +0100
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-05 00:08 +1000
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-04 19:24 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-05 12:30 +1000
Re: Python is going to be hard Roy Smith <roy@panix.com> - 2014-09-04 22:51 -0400
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-04 19:56 -0700
Re: Python is going to be hard Chris Angelico <rosuav@gmail.com> - 2014-09-05 13:08 +1000
Re: Python is going to be hard Ethan Furman <ethan@stoneleaf.us> - 2014-09-03 21:06 -0700
Re: Python is going to be hard Rustom Mody <rustompmody@gmail.com> - 2014-09-03 21:15 -0700
csiph-web