Function declarations ?

D'Arcy J.M. Cain darcy at druid.net
Wed Jun 8 10:27:33 EDT 2011


On Wed, 8 Jun 2011 13:58:18 +0000 (UTC)
Andre Majorel <cheney at 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 at 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.



More information about the Python-list mailing list