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!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'example:': 0.03; 'calls.': 0.07; 'def': 0.10; 'instance:': 0.16; 'input': 0.18; 'stick': 0.22; 'received:74.125.82.174': 0.23; 'pass': 0.25; 'header:In- Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'selecting': 0.29; 'install': 0.29; 'function': 0.30; 'point': 0.31; 'received:74.125.82': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'thanks': 0.34; 'received:74.125': 0.36; 'option': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'header:Received:5': 0.40; 'more': 0.63; 'decided': 0.65; '(5)': 0.71; 'descriptive': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ZGpxdLR/B+02448GZc2ZqSzjltcqLDqVRvVcaMkAs9M=; b=kheh+xZWMYFwRwHnoU6mOwTO2zPki2JeCZc43S1krvcxa+GfuEIWDMcH2zfW+hg9sz 5W3ALbExh483YiduQuuwy++K0gKrZU+29ReY+BFNRRsn6sfmocxFPzEfH6JK91hcl3Zk ZJ7XnE6dCHyni8F0fNWKVuvtEh8A/ayrYMY5JJGr5fZzq0n47vsXbtpDcpi/dRzPtbFL C5Ur9cOzCbz02nBFeXkRZHLKBVXenZ3UXeTB75oUJ/jiPV4K8WpXGUKfCpJaIxl00cTu s/LkVdLlyYwyZCLK+s1mHc1RV/mUyLsfBmchGbowJrMV2kbrv9r66nX34mhSRrNsgxhV 6G7Q== MIME-Version: 1.0 In-Reply-To: <5050938F.7030105@gmail.com> References: <5050938F.7030105@gmail.com> From: Jabba Laci Date: Wed, 12 Sep 2012 18:56:46 +0200 Subject: Re: avoid the redefinition of a function To: Python mailing list Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347469027 news.xs4all.nl 6951 [2001:888:2000:d::a6]:56188 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28986 > 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