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


Groups > comp.lang.python > #28986

Re: avoid the redefinition of a function

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 <jabba.laci@gmail.com>
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 <CAOuJsMnLf4P9p_rZ4p1W-SndkSOV2WK_v5j1AET085LZ6bdavQ@mail.gmail.com> <5050938F.7030105@gmail.com>
From Jabba Laci <jabba.laci@gmail.com>
Date Wed, 12 Sep 2012 18:56:46 +0200
Subject Re: avoid the redefinition of a function
To Python mailing list <python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.572.1347469027.27098.python-list@python.org> (permalink)
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

Show key headers only | View raw


> 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 | NextNext in thread | Find similar | Unroll thread


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