> Do I have to define a function before it is used?

Yes.

> If so, is there a way to declare the function but define it at 
> the end of my
> source file?
> 

def main():
        fun1()
        fun2()

def fun1():
        ## do something

def fun2():
      ## do something else

if __name__ == '__main__':
     main()



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David
> Ransier
> Sent: Friday, July 06, 2001 1:44 PM
> To: Python-ActiveState (E-mail)
> Subject: function declarations
> 
> 
> 
> Do I have to define a function before it is used?
> 
> If so, is there a way to declare the function but define it at 
> the end of my
> source file?
> 

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to