On Jan 14, 11:55 am, Bruno Desthuilliers <bruno.
42.desthuilli...@websiteburo.invalid> wrote:
> Hussein B a écrit :
>
> > Hey,
> > Why this code is working?
>
> >>>> def f1( ):
> > ...      x = 88
> > ...      f2(x)
> > ...
> >>>> def f2(x):
> > ...      print x
> > ...
> >>>> f1( )
> > 88
>
> Well... Because it is correct ?
>
> What make you think it _shouldn't_ work ?

Because def2 is defined after def1 in an interpreted language, not
compiled.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to