greg <[EMAIL PROTECTED]> writes: > André Thieme wrote: >> (aif (timeConsumingCalculation) >> (use it)) > > I think the answer is that you just wouldn't do > that in Python at all. Having magic variables > spring into existence in your local namespace > as a side effect of calling something is just > not Pythonic. (It is very Perlish, on the other > hand.)
Anaphoric macros are controversial in CL, too, for just that reason. But there are a parallel set of macros that explicitly bind a variable so you can get the convenience without the weirdness: (bif (items (remove-if-not #'useful-p big-list-o-items)) (format t "~D items~%" (length items)) (format t "Nothing useful.~%")) You can rewrite the expression in the grandparent as: (aif (result (timeConsumingCalculation)) (use result) or, more idiomatically: (awhen (result (time-counsuming-calculation)) (use result)) -- http://mail.python.org/mailman/listinfo/python-list