Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64275
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'plenty': 0.07; 'problem?': 0.07; 'assuming': 0.09; 'http,': 0.09; 'subject:()': 0.09; 'subject:question': 0.10; 'cc:addr:python- list': 0.11; 'jan': 0.12; '*never*': 0.16; 'elsewhere,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'imo,': 0.16; 'inclined': 0.16; 'reedy': 0.16; 'roy': 0.16; 'smtp,': 0.16; 'sockets': 0.16; 'stuff.': 0.16; 'subtle.': 0.16; 'wrote:': 0.18; 'written': 0.21; 'code,': 0.22; 'input': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'effort.': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'mention': 0.26; 'subject:/': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'database,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'class': 0.32; 'cases': 0.33; 'something': 0.35; 'anybody': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'are,': 0.36; 'interaction': 0.36; 'effort': 0.37; 'too': 0.37; 'being': 0.38; 'problems': 0.38; 'pm,': 0.38; 'anything': 0.39; 'how': 0.40; 'entire': 0.61; 'such': 0.63; 'prompt': 0.68; 'smith': 0.68; 'price': 0.69; 'programs,': 0.74; 'sole': 0.78; 'complexity': 0.84; 'homework': 0.84; 'keystrokes': 0.84; 'pardon': 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=PmxDZUL5zNZO3ZrrXn+f4xMnISxDXLcsOlCqHVYBKeY=; b=GAOdFRpbS9mYOGoL3muIES5PUFajzZ8glSBzUT0blEIzDpgs8cKKfrZSBggPaAqTGv 8mZG196f30Bb9HQWEhD8EKP5VTMa6JBy0VfxpGeZ9aV7+OCHHVQD2+/PFn/hdgXSrOVf klWKFoaqyQJMnqvT/AJblkm8VxDg3sqJKoSK0AR9UC6Bnn6jUZn7JCHPrOWKcd/aZR2F o77iwJHSORLUOVHOOchQBPf9LII+eCY54LEK06JYjIVyuwvqlnR21DeF5nIcvNrbPxsK /40JLxqcT3Pmj5rXAklDa0jx1g9y26RgtOa5rdXUdnUt8DmB6ghCzDHwuP/yAjn0j/fX mpkg== |
| MIME-Version | 1.0 |
| X-Received | by 10.66.136.131 with SMTP id qa3mr10741000pab.77.1390099588002; Sat, 18 Jan 2014 18:46:28 -0800 (PST) |
| In-Reply-To | <lberuo$jn$1@ger.gmane.org> |
| References | <roy-97803E.13302018012014@news.panix.com> <lberuo$jn$1@ger.gmane.org> |
| Date | Sun, 19 Jan 2014 13:46:27 +1100 |
| Subject | Re: question about input() and/or raw_input() |
| 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.5699.1390099597.18130.python-list@python.org> (permalink) |
| Lines | 31 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1390099597 news.xs4all.nl 2859 [2001:888:2000:d::a6]:51650 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:64275 |
Show key headers only | View raw
On Sun, Jan 19, 2014 at 8:33 AM, Terry Reedy <tjreedy@udel.edu> wrote: > On 1/18/2014 1:30 PM, Roy Smith wrote: >> >> Pardon me for being cynical, but in the entire history of the universe, >> has anybody ever used input()/raw_input() for anything other than a >> homework problem? > > > Homework problems (and 'toy' programs, such as hangman), whether in a > programming class or elsewhere, are one of the intended use cases of Python. > How else would you get interactive input without the complexity of a gui? With the network :) I've written plenty of programs whose sole interaction is via sockets (telnet, HTTP, SMTP, whatever), or a database, or somesuch. But I've also written my share of interactive programs that use the console. Plenty of programs don't need the fanciness of a GUI, but need to prompt the user for stuff. If I write something for my brother (and only him), I'm inclined to spend less effort on the UI than I would for something of wide distribution, and console I/O is approximately zero effort. BTW, I'm assuming your mention of "input()/raw_input()" is covering Py3 and Py2, respectively. I have *never* used input() in live Py2 code, and never intend to. It's way too subtle. On those really rare occasions when you actually want to take something from the user and immediately eval it, the extra keystrokes for eval(raw_input()) are, IMO, a small price for the clarity. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
question about input() and/or raw_input() Roy Smith <roy@panix.com> - 2014-01-18 13:30 -0500
Re: question about input() and/or raw_input() Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-18 18:41 +0000
Re: question about input() and/or raw_input() Emile van Sebille <emile@fenx.com> - 2014-01-18 10:49 -0800
Re: question about input() and/or raw_input() Peter Otten <__peter__@web.de> - 2014-01-18 20:05 +0100
Re: question about input() and/or raw_input() Terry Reedy <tjreedy@udel.edu> - 2014-01-18 16:33 -0500
Re: question about input() and/or raw_input() Grant Edwards <invalid@invalid.invalid> - 2014-01-19 16:14 +0000
Re: question about input() and/or raw_input() Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-19 12:12 -0500
Re: question about input() and/or raw_input() Grant Edwards <invalid@invalid.invalid> - 2014-01-19 17:42 +0000
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-20 04:59 +1100
Re: question about input() and/or raw_input() Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-18 21:17 -0500
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-19 13:46 +1100
Re: question about input() and/or raw_input() Rustom Mody <rustompmody@gmail.com> - 2014-01-18 20:15 -0800
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-19 15:21 +1100
Re: question about input() and/or raw_input() Rustom Mody <rustompmody@gmail.com> - 2014-01-18 20:43 -0800
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-19 15:59 +1100
Re: question about input() and/or raw_input() Rustom Mody <rustompmody@gmail.com> - 2014-01-19 00:26 -0800
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-19 21:39 +1100
Re: question about input() and/or raw_input() Ethan Furman <ethan@stoneleaf.us> - 2014-01-19 08:14 -0800
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-20 03:38 +1100
Re: question about input() and/or raw_input() Ethan Furman <ethan@stoneleaf.us> - 2014-01-19 09:50 -0800
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-20 05:41 +1100
Re: question about input() and/or raw_input() Ethan Furman <ethan@stoneleaf.us> - 2014-01-19 11:16 -0800
Re: question about input() and/or raw_input() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-19 06:24 +0000
Re: question about input() and/or raw_input() Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-19 18:07 +0000
Re: question about input() and/or raw_input() Grant Edwards <invalid@invalid.invalid> - 2014-01-19 18:15 +0000
Re: question about input() and/or raw_input() Roy Smith <roy@panix.com> - 2014-01-19 13:37 -0500
Re: question about input() and/or raw_input() Chris Angelico <rosuav@gmail.com> - 2014-01-20 05:43 +1100
Re: question about input() and/or raw_input() Grant Edwards <invalid@invalid.invalid> - 2014-01-19 19:11 +0000
Re: question about input() and/or raw_input() Gene Heskett <gheskett@wdtv.com> - 2014-01-19 15:09 -0500
Re: question about input() and/or raw_input() Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-19 19:17 +0000
Re: question about input() and/or raw_input() Larry Martell <larry.martell@gmail.com> - 2014-01-19 12:24 -0700
Re: question about input() and/or raw_input() Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-19 19:29 +0000
Re: question about input() and/or raw_input() Gene Heskett <gheskett@wdtv.com> - 2014-01-19 15:12 -0500
Re: question about input() and/or raw_input() Larry Martell <larry.martell@gmail.com> - 2014-01-19 13:22 -0700
csiph-web