Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #28986
| References | <CAOuJsMnLf4P9p_rZ4p1W-SndkSOV2WK_v5j1AET085LZ6bdavQ@mail.gmail.com> <5050938F.7030105@gmail.com> |
|---|---|
| From | Jabba Laci <jabba.laci@gmail.com> |
| Date | 2012-09-12 18:56 +0200 |
| Subject | Re: avoid the redefinition of a function |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.572.1347469027.27098.python-list@python.org> (permalink) |
> 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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: avoid the redefinition of a function Jabba Laci <jabba.laci@gmail.com> - 2012-09-12 18:56 +0200
Re: avoid the redefinition of a function Alister <alister.ware@ntlworld.com> - 2012-09-12 18:04 +0000
Re: avoid the redefinition of a function MRAB <python@mrabarnett.plus.com> - 2012-09-12 19:33 +0100
Re: avoid the redefinition of a function D'Arcy Cain <darcy@druid.net> - 2012-09-12 17:49 -0400
Re: avoid the redefinition of a function Peter Otten <__peter__@web.de> - 2012-09-13 10:23 +0200
Re: avoid the redefinition of a function Alister <alister.ware@ntlworld.com> - 2012-09-13 17:59 +0000
csiph-web