order of test
Michael Hudson
mwh at python.net
Mon Jul 29 07:00:50 EDT 2002
Andrew McNamara <andrewm at object-craft.com.au> writes:
> >can we be sure of the order of a test expression ?
> >i mean that
> >t=["one","two"]
> >x=10
> >if x<2 and t[x]=="oups":
> >
> >will never throw an exception if t[2] will be tested before x<2
>
> It's called lazy evaluation,
No it's not! Lazy evaluation is more like Haskell...
> and python shares this trait with C.
This much is true.
Cheers,
M.
--
CLiki pages can be edited by anybody at any time. Imagine the most
fearsomely comprehensive legal disclaimer you have ever seen, and
double it -- http://ww.telent.net/cliki/index
More information about the Python-list
mailing list