Boris Borcic wrote: > min(DTlist,key=lambda date : abs(dt-date)) In Python2.4:
Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: min() takes no keyword arguments Looks like min() only started taking keywords (key) from Python2.5 forward. But the min() solution is good if you're running 2.5 -tkc -- http://mail.python.org/mailman/listinfo/python-list