bruce:
> 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'
Generally no you can't, you have to define a name before using it.
Why do you want to do that?
Bye,
bearophile
--
http://mail.pyt
bruce wrote:
> the docs state that the following is valid...
> print "i = "i
Is this a typo or is that really in the docs?
--
http://mail.python.org/mailman/listinfo/python-list
bruce <[EMAIL PROTECTED]> wrote:
> 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' prio