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


Groups > comp.lang.python > #29000 > unrolled thread

Re: avoid the redefinition of a function

Started byD'Arcy Cain <darcy@druid.net>
First post2012-09-12 17:42 -0400
Last post2012-09-12 17:42 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#29000 — Re: avoid the redefinition of a function

FromD'Arcy Cain <darcy@druid.net>
Date2012-09-12 17:42 -0400
SubjectRe: avoid the redefinition of a function
Message-ID<mailman.580.1347486138.27098.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web