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


Groups > comp.lang.python > #29000

Re: avoid the redefinition of a function

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <darcy@druid.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'case.': 0.05; '425': 0.09; 'sep': 0.09; 'cc:addr:python-list': 0.10; 'programmer': 0.11; 'im:': 0.16; 'perfect.': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'cheap': 0.17; "shouldn't": 0.17; 'input': 0.18; '+0200': 0.20; 'parse': 0.22; 'stick': 0.22; 'voting': 0.22; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'selecting': 0.29; 'install': 0.29; 'error': 0.30; 'point': 0.31; 'but': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'called': 0.39; 'short': 0.39; 'your': 0.60; 'header:Message- Id:1': 0.62; 'more': 0.63; '(5)': 0.71; 'democracy': 0.84; 'descriptive': 0.84; 'received:98.158': 0.84; 'forever.': 0.93
Date Wed, 12 Sep 2012 17:42:16 -0400
From D'Arcy Cain <darcy@druid.net>
To Jabba Laci <jabba.laci@gmail.com>
Subject Re: avoid the redefinition of a function
In-Reply-To <CAOuJsMm6uANJNSRD=Qe70sBYWnnX55yF9dqxQTCcbx_nSfZGBg@mail.gmail.com>
References <CAOuJsMnLf4P9p_rZ4p1W-SndkSOV2WK_v5j1AET085LZ6bdavQ@mail.gmail.com> <5050938F.7030105@gmail.com> <CAOuJsMm6uANJNSRD=Qe70sBYWnnX55yF9dqxQTCcbx_nSfZGBg@mail.gmail.com>
X-Mailer Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Cc Python mailing list <python-list@python.org>
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.580.1347486138.27098.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347486138 news.xs4all.nl 6935 [2001:888:2000:d::a6]:49983
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29000

Show key headers only | View raw


On Wed, 12 Sep 2012 18:56:46 +0200
Jabba Laci <jabba.laci@gmail.com> wrote:
> (5) install mc
> 
> You can type just "5" as user input and step_5() is called
> automatically. If I use descriptive names like install_java() then
> selecting a menu point would be more difficult. And I don't want users
> to type "java", I want to stick to simple numbers.

Your users shouldn't be working this out in any case.  Consider,
computer time is cheap.  Programmer time is not cheap but it is short
lived.  User time is forever.  Don't be lazy.  Parse the input and
prepare to present proper error messages just in case your users are
not perfect.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
IM: darcy@Vex.Net

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


Thread

Re: avoid the redefinition of a function D'Arcy Cain <darcy@druid.net> - 2012-09-12 17:42 -0400

csiph-web