André Thieme wrote: > I think you could do that with functional programming. > You can protect the evaluation by encapsulating the args in a function > object? > > def f_Args(x): > return x > > def g_Args(x): > return x > > and then > a = cond(test, f, g, f_Args(x), g_Args(x)) > > if you adopt cond. But of course it is getting ugly. > So a macro can free you from this extra code.
Yes, that's just lazy evaluation. Again, you don't need macros. -- Dr Jon D Harrop, Flying Frog Consultancy Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/index.html?usenet -- http://mail.python.org/mailman/listinfo/python-list