python function defs/declarations

bruce bedouglas at earthlink.net
Sun Jul 2 20:31:14 EDT 2006


hi..

the docs state that the following is valid...

def foo():
 i = 2
 print "i = "i

print "hello"
foo()


is there a way for me to do this..

print "hello"
foo()

def foo():
 i = 2
 print "i = "i

ie, to use 'foo' prior to the declaration of 'foo'

thanks

-bruce




More information about the Python-list mailing list