castironpi: > For max and min, why can't you just add your argument to the set > itself?
Sometimes that can be done, but in many other situations it's less easy, like in the example I have shown in my first post: max((fun(x) for x in iterable if predicate(x))) There are some ways to add the max there, for example using an itertools.chain to chan the default value to the end of the iterable, but most of the time I just write a for loop. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list