Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: avoid the redefinition of a function (http://www.velocityreviews.com/forums/t952127-re-avoid-the-redefinition-of-a-function.html)

D'Arcy Cain 09-12-2012 09:42 PM

Re: avoid the redefinition of a function
 
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


All times are GMT. The time now is 08:43 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.