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


Groups > comp.lang.python > #7238

Re: Function declarations ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <darcy@druid.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'wed,': 0.03; 'python.': 0.04; 'high-level': 0.05; 'definitions': 0.07; 'subject:Function': 0.09; 'wrote:': 0.14; '425': 0.16; '+0000': 0.16; 'cc:addr:python- list': 0.17; 'suggest': 0.19; 'voting': 0.19; 'solution.': 0.19; 'header:In-Reply-To:1': 0.21; "haven't": 0.22; 'cc:2**0': 0.22; 'maybe': 0.23; 'cc:no real name:2**0': 0.23; 'trying': 0.23; "what's": 0.23; "doesn't": 0.25; 'suspect': 0.25; 'function': 0.25; 'work.': 0.28; 'problem': 0.28; 'anyway.': 0.29; 'cc:addr:python.org': 0.30; 'andre': 0.30; 'define': 0.31; "can't": 0.32; 'source': 0.34; 'however,': 0.34; 'there': 0.35; 'subject: ?': 0.35; 'idea': 0.36; 'charset:us-ascii': 0.36; 'probably': 0.36; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'header:Mime-Version:1': 0.39; 'simply': 0.60; 'your': 0.60; 'header:Message-Id:1': 0.62; 'received:208': 0.62; 'url:net': 0.63; 'democracy': 0.84
Date Wed, 8 Jun 2011 10:27:33 -0400
From "D'Arcy J.M. Cain" <darcy@druid.net>
To Andre Majorel <cheney@halliburton.com>
Subject Re: Function declarations ?
In-Reply-To <slrniuv00f.8s9.cheney@atc5.vermine.org>
References <slrniuv00f.8s9.cheney@atc5.vermine.org>
X-Mailer Sylpheed 3.1.0 (GTK+ 2.24.4; i686-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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.26.1307543256.11593.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 82.94.164.166
X-Trace 1307543257 news.xs4all.nl 49046 [::ffff:82.94.164.166]:35514
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7238

Show key headers only | View raw


On Wed, 8 Jun 2011 13:58:18 +0000 (UTC)
Andre Majorel <cheney@halliburton.com> wrote:
> Is there a way to keep the definitions of the high-level
> functions at the top of the source ? I don't see a way to
> declare a function in Python.

You don't declare functions in Python.  You simply define them.  You
could define all your functions first and then call them.  This is
probably not a bad idea anyway.  However, I suspect it doesn't solve
your problem but since you haven't articulated it I can't tell.

Don't present a solution and ask how it could work.  Tell us what
problem you are trying to solve and maybe we can suggest a solution.

-- 
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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Function declarations ? Andre Majorel <cheney@halliburton.com> - 2011-06-08 13:58 +0000
  Re: Function declarations ? Calvin Spealman <ironfroggy@gmail.com> - 2011-06-08 10:06 -0400
  Re: Function declarations ? "D'Arcy J.M. Cain" <darcy@druid.net> - 2011-06-08 10:27 -0400
  Re: Function declarations ? Asen Bozhilov <asen.bozhilov@gmail.com> - 2011-06-10 15:46 -0700
    Re: Function declarations ? Andre Majorel <cheney@halliburton.com> - 2011-06-12 19:38 +0000
      Re: Function declarations ? Tim Roberts <timr@probo.com> - 2011-06-12 21:27 -0700
        Re: Function declarations ? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-06-14 14:03 +1200
      Re: Function declarations ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-13 14:58 +0000
        Re: Function declarations ? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-06-14 13:18 +1200
      Re: Function declarations ? John Nagle <nagle@animats.com> - 2011-06-13 17:19 -0700

csiph-web