Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3932
| From | harrismh777 <harrismh777@charter.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Input() in Python3 |
| References | <I89sp.39115$yp3.5013@newsfe09.iad> <mailman.736.1303458378.9059.python-list@python.org> |
| Message-ID | <pFKsp.3987$uh5.523@newsfe02.iad> (permalink) |
| Date | 2011-04-23 20:03 -0500 |
Chris Rebert wrote: > Well, it pretty much*was* totally removed; it was prone to misuse and > had very few legitimate uses. It's just that raw_input() also got > renamed simultaneously. > What were you using it for? There are often much better alternatives. For the purpose pretty much described in PEP 3111... education. Teaching new programmers input, control, arithmetic, logic, and output works best with simple built-ins. IMHO I want to teach young folks how to get stuff into their simple programs, crank on them a bit, and spit out the results... without having to teach them imports, libraries, &etc. Keep in mind that some of this stuff is very simple (say trivial) and is being used to provide a way to get the data 'they are expecting' into the program easily, with a prompt. This was the great concept in BASIC, and REXX, and others. The C language broke with this concept by declaring that the language does not provide I/O ... only in the standard library, as functions! The beauty of Python (as I've noted before) is that it can be used in an uber-sophisticated way... AND it can also be taught to children! Having thought a little more about that, I suppose that I agree that input() should return a raw string. After all, the students aren't really entering "numbers" are they?? They are entering strings of characters that need to be converted into numbers... easily explained... I was just surprised to find that issue so hotly debated... again, why remove something that works. The wisdom was to use a system call instead, right? kind regards, m harris
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
Input() in Python3 harrismh777 <harrismh777@charter.net> - 2011-04-22 01:22 -0500
Re: Input() in Python3 Chris Angelico <rosuav@gmail.com> - 2011-04-22 16:49 +1000
Re: Input() in Python3 Chris Angelico <rosuav@gmail.com> - 2011-04-22 16:50 +1000
Re: Input() in Python3 Chris Rebert <clp2@rebertia.com> - 2011-04-22 00:46 -0700
Re: Input() in Python3 harrismh777 <harrismh777@charter.net> - 2011-04-23 20:03 -0500
Re: Input() in Python3 Westley Martínez <anikom15@gmail.com> - 2011-04-22 06:52 -0700
Re: Input() in Python3 Mel <mwilson@the-wire.com> - 2011-04-22 10:08 -0400
Re: Input() in Python3 Chris Angelico <rosuav@gmail.com> - 2011-04-23 06:25 +1000
Re: Input() in Python3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-04-22 23:55 +0000
Re: Input() in Python3 Chris Angelico <rosuav@gmail.com> - 2011-04-23 10:07 +1000
Re: Input() in Python3 Westley Martínez <anikom15@gmail.com> - 2011-04-23 12:33 -0700
Re: Input() in Python3 Mel <mwilson@the-wire.com> - 2011-04-25 12:50 -0400
csiph-web