avoid the redefinition of a function
Jabba Laci
jabba.laci at gmail.com
Wed Sep 12 12:56:46 EDT 2012
> For example:
>
> def install_java():
> pass
>
> def install_tomcat():
> pass
Thanks for the answers. I decided to use numbers in the name of the
functions to facilitate function calls. Now if you have this menu
option for instance:
(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.
Laszlo
More information about the Python-list
mailing list